Code examples, omg
Manuel
Posts: 105
Hey!
I was going through the code examples (of the Thermocouple DS2760 w/e) , to make my own code. I realized that in the advanced code zip there are two tables and one code for the bs2p. I haven't had yet very much experience with lot of memory usage, but I realized that one table uses all the eeprom. How am I going to use my bs2p with the code that uses half eeprom and the table that uses full eeprom? Does this mean I'm only able to use a limited range of values?
Manuel C Reinhard
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
Post Edited (Manuel) : 4/14/2006 5:11:59 AM GMT
I was going through the code examples (of the Thermocouple DS2760 w/e) , to make my own code. I realized that in the advanced code zip there are two tables and one code for the bs2p. I haven't had yet very much experience with lot of memory usage, but I realized that one table uses all the eeprom. How am I going to use my bs2p with the code that uses half eeprom and the table that uses full eeprom? Does this mean I'm only able to use a limited range of values?
Manuel C Reinhard
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
Post Edited (Manuel) : 4/14/2006 5:11:59 AM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Sorry for all these questions, but I'm still in highschool. I'm a beginner.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
Post Edited (Manuel) : 4/14/2006 4:54:09 PM GMT
E PIN 1 ' LCD Enable (1 = enabled)
RW PIN 2 ' Read/Write\
RS PIN 3 ' Reg Select (1 = char)
LcdDirs VAR DIRB ' dirs for I/O redirection
LcdBusOut VAR OUTB
this is a part of the code DS2760CAdv.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv87.pdf
The RW and RS pins are dealt with using the LCDCMD, LCDOUT, and LCDIN instructions -- I put those definitions in the program so that people using it would be aware of each pin function.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I have some few more questions. As I have worked with many different basic stamps (BS2, BS2SX and now the BS2P), I have seen that sometimes constants change from one type of BS to another. Why is that? What defines the constant? for example the constants for the Baud Rate mode. For the Thermocouple code, does the constants change from the BS2PE to the BS2P?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
The BS2pe runs at the same speed as the BS2, the BS2p is 2.5x faster. That said, the 1-Wire protocol, used by the thermocouple (DS2760) module, has defined timing and is preadjusted in all BS2p-family Stamps. That said, the BS2pe is not fast enough for turbo mode 1-wire, but the BS2p is. FWIW, I've never found turbo mode useful as typical 1-Wire systems don't move a lot of data.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I was looking at your code again and saw that you use a OWIN command to retrieve the serial number , at least that's what I think, from the DS2760. Can I, instead of doing that, just retrieve the serial number once and then use it directly? What I mean is debuging the variable "char", and then writing it down... Because that way I think that I may be able to have many DS2760 in one pin, am I right?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
Post Edited (Manuel) : 4/15/2006 10:23:21 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I have a LCD related question. What takes less time for the stamp to dispay stuff, a parallel or a serial LCD? (Comparing two 16x2 LCDs). Also, Can I use a Scratchpad Ram value without storing it to a variable? Does SPRAM have a limited number of PUT's ? like the eeprom...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
Post Edited (Manuel) : 4/15/2006 10:47:45 PM GMT
Parallax LCD access is faster, but uses seven pins.
You can use the Scratchpad, but not like named variables; you need to use PUT and GET with an address, and the Word modifier for 16-bit values.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
You'll also find a bunch of 1-Wire programs in our BS2p Plus Pack: http://www.parallax.com/detail.asp?product_id=45184. Again, compare those programs to the docs for the various parts and -- after a while -- you'll get the hang of it. None of demo programs were written in one sitting; we had to work at them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I kind of made it work, after fixing my mistakes like thousand times, lol. (I don't have yet tried many DS2760 on the same line, cuz I just own 1 right now, lol.) I just have a simple question. Am I right that the DS2760 can not give me values in a smaller meassure, so that I can meassure more accurately my K-junction temperature?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax