Quote Originally Posted by manumenzella View Post
Hi Steve. Thanks again for all your time.
I forgot to add int the first post that the PIC that is having to do some foregroud task is the one that is receiving the data. (sorry )
As for what I understood from the datasheet, and please correct me if I'm wrong, the USART can receive two full bytes berore you have to read them using the register. But that is only 140 us, not even enough for a single loop to be processed in the program im using. Is this correct???
By the way, what I am trying to do is a LED cube, with the LEDs multiplexed, so if the transmission takes long enough, there will be flickering in the leds.
Thanks a looooooot!!!
Manuel
...which is why you use the hardware UART and some interrupts and write your own buffer routine to pull out the data received when you can spare the time to do it. I'm multiplexing & PWM'ing 306 RGB LEDs (918 total) on a 921.6kbps serial line while at the same time receiving 9600 bps control data over an RF link...all using a bunch of 16F628A's and a master 18F2620. I don't see any flickering.
Don't count on that 'receive 2 full bytes before you have to read them' thing, because it WILL bite you later on when you least expect it.