Hi,
These are software UARTS using the bit-banging technique.
The speed is the same because the speed is tied to the baud rate
you receive the data.
Best regards,
Luciano
Hi,
These are software UARTS using the bit-banging technique.
The speed is the same because the speed is tied to the baud rate
you receive the data.
Best regards,
Luciano
ahh. that makes sense. im using 9600N at the moment. how do i know how high i can go? are there chip specific restrictions?
19200 according to the manual is the top end for SERIN/OUT2. You will need an OSC faster than 4MHz though.
Look at appendix A
Dave
Always wear safety glasses while programming.
At 4MHz the recommended is less than 9600. 9600 will work at 4MHz if all is stable.
There is some debate, but I do not like the internal OSC for serial, I use a crystal resonator (the ones with three pins, built in caps) seem to be very stable.
Dave
Always wear safety glasses while programming.
ahh, i cant go any higher then. i use an external oscillator anyway because thats the way i was shown how to do it. everything seems to be working fine now. i had a bug that looked like the serin command wasnt running fast enough but i turned out to be the wait() part.
the way ive solved it has created another question. the chips must wait for 250 and their own unique ID before doing something. that bit works fine but i want to be able to send a command that resets their ID no matter what it is.
the code im using now is
serin2 porta.2,16468,2000,nocmd,[wait(250,address),cmd,val]
can i tell it to do something if it gets 251 and anything *aswell*? if not then i have a backup plan but i would rather do it that way
If I understand what you want the answer is yes. After the TIMEOUT for the 250 ends you could have it WAIT for 251.
Something like thatCode:serin2 porta.2,16468,2000,nocmd,[wait(250,address),cmd,val] serin2 porta.2,16468,2000,nocmd,[wait(251,?????),cmd,val] serin2 porta.2,16468,2000,nocmd,[wait(252,?X?X?X),cmd,val]
But this will eat up speed. Maybe decrease the TIMEOUT?
Dave
Always wear safety glasses while programming.
Bookmarks