TSL230 issues
skynugget
Posts: 172
hey all im playing with a tsl230 light to frequency converter on an sx28. With the following code, my output is not the same as if i where to use the stock demo code for the bs2. im just testing with the sensitivity disabled for now. When i run the following sx/b code, the value of reading increments by a value of 256.. ie 0 256 512 768 ....... running the bs2 code i have a value of 80 (in my current light conditions) on the sx28 its sitting at 0 until flash a light on it. any ideas? thanks in advace!!
sx/b 2.0 code:
sx/b 2.0 code:
DEVICE SX28, OSCXT2, BOR42 FREQ 4_000_000 STACK 16 TSL230 pin RA.2 input tmpw1 var word reading var word GET_LIGHT func 2 word PROGRAM Start Start: reading = get_light WATCH reading, 16, udec BREAK GOTO start func GET_LIGHT tmpW1 = 0 count TSL230, 200, tmpw1 return tmpw1 endfunc
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
does COUNT work differently in SX/B then in stamp basic?
· I had a look at the compiled code, and there is a bug in the COUNT command.
· I will post a corrected version of the compiler tomorrow.
· Thanks for catching that...
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
Post Edited (Bean (Hitt Consulting)) : 5/10/2009 9:03:02 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
When all else fails.....procrastinate!
· I have posted version 2.00.23 of the compiler.·http://forums.parallax.com/attachment.php?attachmentid=0
· This should fix the bug you found.
· Thanks again for your post. It is users like you who make the compiler a better product.
· Let us know if it works now.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
Post Edited (Bean (Hitt Consulting)) : 5/11/2009 2:09:43 PM GMT
For anyone else check the sx2.0 thread, the link posted above no longer works cause Bean fixes so much stuff so fast:
http://forums.parallax.com/forums/default.aspx?f=7&m=323767
Post Edited (skynugget) : 5/12/2009 12:18:57 AM GMT