SX Frequency
Hello,
I want to use an sx28 with the radioshack 126-137A IR reciever and analyze a signal outputed by an pocket pc. The signal is the letter "A" using serial code. I can do everything but I am not sure about the freq needed by the sx28. I will probably use SX compiler to program the sx28. I am not sure if the Pulsin command will do. The goal of this project is to look at the signal and see how th e pocket pc's IR port send s the serial data. I do not have an oscilloscope. Thanks, Curtis
I want to use an sx28 with the radioshack 126-137A IR reciever and analyze a signal outputed by an pocket pc. The signal is the letter "A" using serial code. I can do everything but I am not sure about the freq needed by the sx28. I will probably use SX compiler to program the sx28. I am not sure if the Pulsin command will do. The goal of this project is to look at the signal and see how th e pocket pc's IR port send s the serial data. I do not have an oscilloscope. Thanks, Curtis
Comments
Do you know the baud rate of the communication from the pocket PC?
I would clock the SX a lot higher than the baud rate so you can be sure to catch the voltage transitions on the serial data line.
Do you plan to use interrupts or polling?
-Electronegativity
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I wonder if this wire is hot...
Thanks for your response. I am using a baud rate of 9600. I am have in stock, 4mhz, 20mhz, and 50mhz resonators. I have sx28 chips. No interrupts or polling but should I?
Thanks,
Curtis
If this is going to be a battery powered application then you should use the lowest clock speed that works.
Guenther Debauch posted a nice curve of power requirements versus clock speed somewhere on this board, and there is a less detailed one in the manual.
A first order approximation of this curve is that the SX will draw 1 milliamp per megahertz.
What I meant by polling or interrupts is that there are 2 ways for the SX to read an incoming digital signal.
You can pipe the signal into a pin on the port B register and wait for a transition from low to high then count the number of clock cycles before the pin drops low again by using the inerrupt function.
You could also poll the data line by checking to see if it is high or low at a rate that is much faster than the actual baud rate.
If you know for a fact that the pocket PC communicates at 9600 baud then it would probably be easiest to use the "serin" command that's available in SX/B, or at least compile it and look at the assembly code that it generates.
Good luck.
-Electronegativity
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I wonder if this wire is hot...
If you can force your device to run in SIR mode, you'll have a decent chance, although I'm not sure it goes much slower than 115K2.
If your device is a WinCE box, then odds on, it'll be trying to bring up a network stack on the IrDA port, and you'll have to kick that out of the way before it makes any sense at all.
There's loads of data on the web, and http://www.irda.org has the truth [noparse]:)[/noparse]
(I don't know what that IR receiver you're using is, so I've got no idea if it's appropriate.
http://www.radioshack.com doesn't seem to recognise 126-137A )
Steve
Thanks for all the good info. The IR module is discontinued from RadioShack but I have a datasheet. It is the same one as the newer module that RadioShack sells today. There·are Vcc, Gnd, and Vout pins. I simply used NSBasic programming language and the MSCOMM control to send "A" via the IR port. I do believe that that even though I set the baud rate to 9600 in the code, it is running much faster (115K). I used a logic probe and counted the (Hi) (Lo) changes and it was a binary number representing the letter "A". Come to think of it, the NSBasic creator said the comm control for that ce device was using SIR. I will try to change baud on my VB 6.0 terminal program. I would like to use a battery and a 4mhz resonator. I need to learn more about interupts and polling.
Thanks, Curtis