Jump to content
43oh

jimk3038

Members
  • Content Count

    6
  • Joined

  • Last visited

  1. This might be cool too. Call CmdT() to start a temperature conversion. Inside CmdT() a timestamp is set to record millis() which returns the system milliseconds since powerup. Then, in GetNodeData() a check is made that a minimum of 750 milliseconds has elapsed. This would allow an application to call CmdT() to start a conversion, do some other processing, and then return later to collect the results. The code, I think - untested, would look like the following. Just an idea to allow other things to happen while a temperature conversion is happening on the bus. uint32_t convertTimest
  2. The following code works even better if you have multiple sensors on the same bus. The following code also handles negative values. Simply call CmdT() first - all the sensors on the bus make a temperature measurement at the same time. Then, call GetNodeData( addr[] ) for each sensor on the bus. With several sensors on the bus this method is much faster. I'm reading three sensors in under a second. Jim void DS18B20::CmdT( void ) { reset(); write_byte( 0xCC ); // skip ROM command write_byte( 0x44 ); // convert T command OW_HI delay( 750 ); // Delay in milli
  3. Grant, Thanks for a great library - saved me a bunch of time. I added the following function so now I can read temperatures from multiple sensors on the same wire. Seems "GetData" and "GetData10" functions are designed to read from a single sensor on the bus. WIth multiple sensors, all the sensors try to respond and step on each other. The function "GetNodeData" fixes that. Thanks again, Jim int32_t DS18B20::GetNodeData( uint8_t rom[8] ) { uint8_t i; uint16_t temp; reset(); write_byte(0x55); // Choose ROM for ( i = 0; i < 8; i++ ) write_byt
  4. Was any solution ever found for this problem? I hit the same issue while trying to get FreRTOS up and running. Everything works great until memset is called - which seem to generate a hard fault. Even TI's stock example "/stellarisware/boards/ek-lm4f120xl/freertos_demo/gcc/freertos_demo.bin" locks up.
  5. Sorry about not indicating where the snipit came from. Here is a link to the source article. Yeah, I did find the temperary files that Erengia is making after a build is complete. However, there were no memory map files generated. Is there a way to adjust a setting to have Erengia generate a map file? Looks like (according to the link above) "At any point in time, there is a highest point in RAM occupied by the heap. This value can be found in a system variable called __brkval." Here is another good link - however, it's all about an Arduino. This guy has shows a couple of diag
  6. I'm trying to keep an eye on the amount of RAM my application is using. After a bit of searching, I found the following code that returns the current amount of RAM that is being used. However, the function throws a compiler error about some undefined variables. Is this the right approach to find current RAM usage? Or, is there something else I should be using with Energia? Thanks, Jim // Return the current amount of RAM used. // ---------------------------------------------------------------------------- int freeRam () { extern int __heap_start, *__brkval; int v; retur
×
×
  • Create New...