Shop OBEX P1 Docs P2 Docs Learn Events
UART 115200 with x3 sampling — Parallax Forums

UART 115200 with x3 sampling

JavalinJavalin Posts: 892
edited 2006-01-02 15:22 in General Discussion
All,

Happy new year!!

Quick ISR question;· If I want to run an ISR dual uart using 3 times sampling rather than 4 so I can add buffer code to the ISR, would the following figures be correct?

SX18 at 50mhz (1/50000000 = 20ns)
int_period at 144 (144 * 20ns = 2.88us)
baud_rate_divisor at 3 (3 * 144 = 4.32us)
baud_rate_start_delay at 4 (4 * 144 = 5.76us - a little short I know)

So with a dual uart approach I guess every 3 ISR's I am transmitting and recieving (bar start bits) on one of the uarts.

Does this look correct?

Many thanks for any help!!

James

Comments

  • JavalinJavalin Posts: 892
    edited 2006-01-02 15:22
    Ignore my post! Just realized whats wrong!!

    FYI - Because I am alternatly sampling two uarts alternate uarts are sampled at 2.88us. So each uart is sampled at 5.76us. So I completely miss the sampling in a divisable 8.68us (1/115200) timebase.

    Doh.
Sign In or Register to comment.