skimask
- 28th January 2007, 22:48
I'm away from the house for a couple of months, don't have access to any 'scopes, counters, and all the other gadgets...
I'm trying to get SERIN2 to work at 38,400 baud and having a rough time getting it to be consistent. My PC talks to the unit at 38,400 just fine, but the PIC doesn't. I'm thinking the timing might be just far enough off to cause problems. I can go the hardware route no problem, but the character/string handling capabilities of SERIN2 make it a lot easier to work with for now.
Anyways, here's what I'm trying to use right now:
SERIN2 configs - 1,000,000 / 38,400 = 26; 26 - 20 = 6, that's the mode number if I define OSC 40.
I'm thinking if I do this instead:
1,000,000 / 3,840 = 260 - 20 = 240, there's the new mode number if I define OSC 4 and change the rest of the program accordingly to match the new OSC define (or at least use some other OSC define value that makes a nice multiple of 38,400 baud).
I'm wondering if somebody could try these two options on a 'scope and see which one is closer to the actual 38,400 baud.
I'm trying to get SERIN2 to work at 38,400 baud and having a rough time getting it to be consistent. My PC talks to the unit at 38,400 just fine, but the PIC doesn't. I'm thinking the timing might be just far enough off to cause problems. I can go the hardware route no problem, but the character/string handling capabilities of SERIN2 make it a lot easier to work with for now.
Anyways, here's what I'm trying to use right now:
SERIN2 configs - 1,000,000 / 38,400 = 26; 26 - 20 = 6, that's the mode number if I define OSC 40.
I'm thinking if I do this instead:
1,000,000 / 3,840 = 260 - 20 = 240, there's the new mode number if I define OSC 4 and change the rest of the program accordingly to match the new OSC define (or at least use some other OSC define value that makes a nice multiple of 38,400 baud).
I'm wondering if somebody could try these two options on a 'scope and see which one is closer to the actual 38,400 baud.