Okays, well I would do this, except whatever I try to send, the computer only recieves lots and lots of ones, which it decodes as 03h (111), and FF (11111111). I think there's probably some other problem than the baud rate. On 5/2/05, Russell McMahon wrote: > > I know nothing about the IDC2, but I *do* know that an RC-osc > > will have a hard time to give you any relailable serial > > communication. > > You need *some* crystal (or maybe resonator) based osc to be able > > to use the UASRT (or maybe the prec internal osc block on newer > > devices). > > You need about 50/N% clock stability overall for async operation. > better is better. > So for 1+8+1=10 bits you need 50/10%=5% accuracy. > > If your PC end crystal is approaching 0% in error then you get most of > that 5% at the microprocessor end. Some (but by no means all) RC > clocks will give you that sort of accuracy across voltage, temperature > and time. > > But, as Jan-Erik says, something better than RC is a really good idea > if you can manage it. A resonator is fine. > > If you aren't at all sure what your baud rate is then Murphy says it's > almost certainly wrong. > (If you ARE sure then Murphy says it may be wrong :-) ). > > If you have a scope then the shortest bit length will tell you what > the baud rate is if you send anything with a 010 or 101 sequence in > it. > > No scope? > Set data to, say, $00, with a good gap between bytes. > If you can send individual characters without CRLF it's ***MUCH*** > easier to work out what's happening. > If you are sending slower than you think then the receiving routine > will see an $00 followed by a second character with b0xxxxxxx. ie > 01111111 or 00111111 or 00011111 etc depending how slow. if reaaally > slow it will se several $00's followed by a b0xxxxxxx. > Having your PC end able to display the result of receiving $00 helps a > lot here :-) > > So, if you send 1 character from the uP and see several characters, > odds are it's too slow. Double sending data rate and try again? > See $00 - it works. > Still see 2+ characters, double clock rate again. > > If you are sending faster than you think the PC will see N 0's and M > 1's / 1<=N<=7, M=8-N. > Decode the displayed character and you can see how much faster it is > than you expected. > > Using a scope is much easier. > > > RM > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist