Can BS2 pins P0-P15 read a TTL signal?
teatreeoil
Posts: 7
I am trying to read the serial signal from the Parallax RFID reader. It seems like I should be able to do that using the serin construct, but the data I get seems to be junk. If I'm reading the reference manual right, it says the Sin pin can read TTL, but that the other pins read RS-232? Is that correct?
Unfortunately the BOE I'm using doesn't give me a jumper to Sin pin (correct?), so using Sin seems unwieldy at best - I guess I'd have to pull the IC and put it on a breadboard, and I don't want to keep putting the IC back and forth like that for code/try iterations.
Am I making sense so far, and if so, what's the best path here? Add hardware to convert the TTL out from the RFID reader to be RS-232 compatible for one of the P0-P15 inputs?
Is there any other way to proceed here? Right now I just want to read some rfid tags using the BS2 while it's in the BOE.
Unfortunately the BOE I'm using doesn't give me a jumper to Sin pin (correct?), so using Sin seems unwieldy at best - I guess I'd have to pull the IC and put it on a breadboard, and I don't want to keep putting the IC back and forth like that for code/try iterations.
Am I making sense so far, and if so, what's the best path here? Add hardware to convert the TTL out from the RFID reader to be RS-232 compatible for one of the P0-P15 inputs?
Is there any other way to proceed here? Right now I just want to read some rfid tags using the BS2 while it's in the BOE.
Comments
P0-P15 are TTL/CMOS ready pins (i.e. a 1 equals >= ~ 1.4 volts, anything less = 0).
So if you are using P0-P15 to communicate with your RFID reader, and it doesn't work, post your code and/or a photo of your hookup.
Do not use the RS-232 port to connect with your reader -- you'll likely damage it.
If you want to use Sin/Sout to comm. as RS-232, use pin 16 in your code.
This is all thoroughly documented in the manual, so I would refresh your knowledge by reading up -- before you damage a device and/or disassemble your Stamp needlessly.
Thanks for the excellent followup. I'm no stranger to reading tech documentation, so when I get home this evening I'll quote the section of the manual which had me understanding things the other way around.
Also, will post code and photo as requested, as well as observed output. I can get data, it just does not contain the start/end bytes, nor is it consistent with the output representing a certain alphanumeric range as described. More later, thanks!
Any reason not to tie pin 2, /OE, to ground, rather than to one of P0-P15? This is what is shown in the book "Making Things Talk" which I was vaguely following (although using the BS2 rather than an Arduino).
I see. Supposing I have an application in which it would be sufficient to know if a tag was present at 15 sec intervals. Sounds like I could extend battery life significantly by polling at that interval, rather than leaving it enabled all the time. Thanks for bringing my attention to that.
When I get my project complete (long way to go still), I'll share it with the group. Some of you who are parents should get a laugh out of it, at least.
Thanks again.