Hi Ben,
I have found a problem when reading the UART that it takes an excessive amount of time. The chip i am using that i am having problems with is a 32MX270F256B.
I have driven two outputs, one is connected to the brown trace and monitors the cycle time of the main loop, toggling every program cycle. The red trace is in the interrupt routine that is activated when UART receives data. The output turns on at the start of the routine and is turned off at the end of the routine.
I have used the same program in each instance, running one on a 18F26K80 and the results are shown below. To read a byte from the UART takes 64uS. After this the program reverts back to processing the main loop again until the next byte is availablein approx 1ms time.
The other is when it is run on a 32MX270F256B. To read a byte takes just over 1mS. The main loop is not processed at all until the serial port becomes idle again.
Thanks
Zane
UART reads taking an excessive amount of time
Moderator: Benj
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
Re: UART reads taking an excessive amount of time
Hi Leigh,
Thanks for your efforts. I have a fair bit on but will have time to look at this on Thursday and will get back in touch to let you know how it goes.
Thanks
Zane
Thanks for your efforts. I have a fair bit on but will have time to look at this on Thursday and will get back in touch to let you know how it goes.

Thanks
Zane