Sajjadkhan
Full Member level 5
- Joined
- Sep 25, 2010
- Messages
- 307
- Helped
- 17
- Reputation
- 34
- Reaction score
- 16
- Trophy points
- 1,298
- Location
- Rawalpindi,Pakistan
- Activity points
- 4,199
I am new to these controllers and now i want to learn USART, i have been reading about them but some questions i have which are making me confuse.
1. i have read in "mikroc pro for pic" that it has full duplex asynchronous transmit and receive. but people on the net set the matching baud rate for controller and hyper terminal in PC and using just rx and tx. i think this is not asynchronous. asynchronous is like this: if suppose controller baud rated is slower then pc then if its buffer is full then it should acknowledge the pc to wait and to hold data ( that is to be transmitted) until controllers buffer frees up and same case on the pc side. i was thinking that can i use other pins of DB9 for this purpose like request to send, clear to send etc (though i dont know wat they are for but i am guessing from the name) .
2. the mikroc has defined some routines for uart which handles lots of things in the background like we dont have to set bits in TXSTA register because uart1_init() does that. but what about the errors? forexamle if framming error occurs and and FERR bit is set. there is no routine for handling that right? so i believe that we should do something like this
if(FERR_bit ==1)
//discard that data;
else
temp = uart1_read();
any thoughts?
1. i have read in "mikroc pro for pic" that it has full duplex asynchronous transmit and receive. but people on the net set the matching baud rate for controller and hyper terminal in PC and using just rx and tx. i think this is not asynchronous. asynchronous is like this: if suppose controller baud rated is slower then pc then if its buffer is full then it should acknowledge the pc to wait and to hold data ( that is to be transmitted) until controllers buffer frees up and same case on the pc side. i was thinking that can i use other pins of DB9 for this purpose like request to send, clear to send etc (though i dont know wat they are for but i am guessing from the name) .
2. the mikroc has defined some routines for uart which handles lots of things in the background like we dont have to set bits in TXSTA register because uart1_init() does that. but what about the errors? forexamle if framming error occurs and and FERR bit is set. there is no routine for handling that right? so i believe that we should do something like this
if(FERR_bit ==1)
//discard that data;
else
temp = uart1_read();
any thoughts?