Hi Matt,
> Here are some issues I have with serial ports that relate to this lib. > 1. The blocking delays and monitoring data while receiving data. > - I'll use an interrupt (serial_hw only), maybe usb? and a Queue for > the data, as I said before. First, check out if serial_hw_int_cts. This is a well-designed interrupt based serial library with queing. If this does not suit your needs (which I can't imagine, btw), check if there is a character before you call a blocking get. > 2. Serial software will not do interrupts when receiving data. > - I would have to use a timer interrupt to monitor for data and use a > Queue for the data. I don't like the different usage, or having to use > a timer. Stay away from serial_software for receive as part of a library if you can, since you need to be in the receiver routine during any character coming in. > Other general serial port stuff I don't like. > 3. Serial software contains many blocking delays for timing bits. > Should another method be looked at? I'm sure it is too difficult. Gordon created an interrupt based library for serial software. An impressive piece of work which is on the boundary of what a pic with JAL could achieve. As a consequence, applications using it should be well-designed and as such, this is not a novice library imo. > 4. I guess serial hardware must be blocking as well for sending data > at 9600 baud. I don't see what you mean with blocking here. When does it need blocking? > - data should go into a queue, then shifted out. but again, I guess > this needs a timer to monitor the queue and PIC tx register state Not a timer. See serial_hw_int_cts. > 5. PC's and other devices all use queues for serial data, PICs and our > libs can only do 1 byte at a time. If I don't pick up data fast > enough, will it get lost? Actually, it can do 2 bytes at the time: you have time to fetch a byte while the next one is received. You should do this before receiving is done, or you will get an overrun (error bit set, character lost). serial_hw_cts handles this for you! Joep -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
