writing ISR for UART

Feb 07, 2008 25 Replies

That's a neat way to do it, if you are already happy being restricted to power-of-two buffer sizes. Since most buffer sizes in practical programs are picked as rough guestimates, that's no big loss.

You are also relying on putptr and getptr being atomically readable. That's fine with 8-bit variables, but is important to consider when using 16-bit counters for larger buffers on 8-bit micros.

i need few example related to interrupt with serial port. please give m related links. it's batter for me if i get sample code as i told you i a not expert on C. please give me few times for it.

No, you don't need examples of interrupt code. You need to learn to program in C - interrupt routines and synchronising data transfers between interrupts and the main program can be a little tricky. You need to take courses or read a book, or employ a qualified programmer - begging people to do your job is not the answer.

You might like to get a keyboard with capital letters - it would make your posts more legible.

me

am

ok, good suggestion. the blogs are the place for learning the tricks, believe. do you? whetever... you might be very expert, then why do yo hesitate to assist some one, as the objectives of the blogs serve this. o just to show off. i really like relevant suggestion. in all through th post i ask for specific questions (how to call case in ISR) and you show your funny expertise!!!! all beginners might stupid. and the qualifie programmer..............what about you?

I think most of the readers here are like C compilers----they are case-sensitive. If you want someone to help you with C code, you are going to have to learn to use the shift key.

Mark Borgerson

---------------------------------------------------------- Dont ISR . Main task polls the serial port , when busy it ignores you . You do want it to "work" for you ? dont you ?

While developing the S/W , a key/button to break out of a faulty loop , saves time , but thats the only button .

I have no interest in unstructured programming its a waste of my precoius time .

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required