Jump to content

jeffman54

Members
  • Content Count

    5
  • Joined

  • Last visited

About jeffman54

  • Rank
    Noob Class

Profile Information

  • Location
    Brisbane, Australia
  1. Hi Pavel, I'm still getting issues. Using your code, at 115200 baud, I don't get any response from the DS18B20 and at 38400 baud I get 4095.93 degC errors instead of zeroes ! I will need to track this issue down as something's not quite right somewhere. Once I find out what's going on I'll repost on the Tiva forum as suggested. Cheers. Jeff
  2. I have tested the TM4C_DS18B20 library on the TM4C123GXL LaunchPad and it works ok. The only thing to know is that the BoosterPack pinouts for 5V and GND are J3-1 (VBUS) and J3-2 and the signal pin for PE-3 is J3-9. Note that the equivalent boosterPack pin as used on the TM4C1294XL (X8-12 = J3-6) is actually pin PE-5 on this board. There does still appear to be an issue with the temperature reading showing 0 C every now and then. This appears to be a timing issue somewhere in the readOW() function after each data byte is read. I will try to find out if it just requires tuning of the points in the read cycle. There may be some delays introduced when the serial port interrupt overrides the timing in the readbyte() code. Jeff
  3. Hi guys, Well I finally got some time to work on getting Grant's code to work on the TM4C1294XL LaunchPad. I have attached my DS18B20 on PortE-3 (BoosterPack pin X8-12) with a 4.7K pullup resistor to 5V on pin X8-2 and GND on X8-4. I managed to get it working with minimal mods to Grant's demo program. I had to use a seperate member function to initialise the pin port and bitmask variables as it didn't seem to like doing that in the constructor. This InitGPIO() function also allows for an error return if the pin description used (eg. PE-3) is invalid. I also found a situation where the reset() function error value (2) for a stuck line was being interpreted as finding two devices, so I have changed this to have a value of 99. I have provided a modified example with the minor changes. Everything seems to work now although I haven't tested it on the other TM4C LaunchPad board - I might try that tomorrow. I have called the library TM4C_DS18B20 to show that it is currently a different architecture and needs to be placed in the libraries directory under the lm4f hardware directory. Try it out and let me know if there are any issues. Cheers. Jeff TM4C_DS18B20.zip
  4. After a bit of research I have found that the Tiva C Peripheral Driver code provides OneWire functions but these are designed to use the 1-Wire modules available in the TM4C129X MCUs used in the development kit DK-TM4C129X. The TM4C1294NCPDT MCU used in the Connected LaunchPad doesn't contain the 1-Wire module however. I think I can probably create some equivalent code to bit-bang the 1-Wire interface using the GPIO module calls and in turn create an appropriate Energia OneWire library for the LaunchPad in the next few days (I'm currently between jobs and have some time). I'll let you know how I get on. Jeff
  5. This problem seems to be caused because the defined macros portDirRegister, portRenRegister, portInputRegister, and portOutputRegister in GFDS18B20.cpp refer to arrays port_to_dir[], port_to_ren[], port_to_input[] and port_to_output[] which are normally externally defined in the msp430 pins_energia.h file. The current TM4C129 pins_energia.h file found under the lm4f/variants/launchpad_129 directory doesn't define these arrays and appears to use a totally different base referencing scheme for the pin ports. I think it will take a bit more work to get the port register mechanism used for the MSP430 to operate for the TM4C. Jeff
×
×
  • Create New...