ste2006
Advanced Member level 4
I have some code written that receives data from a PIC18F UART, When i use the "gets" routine from the peripheral library it works fine but when i write my own for loop it wont work at all,
Anyone any ideas??
Works perfectly
Wont Work
I cant see the difference,
Any thoughts??
Thanks
- - - Updated - - -
Its Ok i solved it,
For any one else with a similar issue you need to poll the receive bit and only call the Read2USART when new data is ready
Anyone any ideas??
Works perfectly
Code:
gets2USART((char *)RxData,9);
Wont Work
Code:
for (ccount=0;ccount < 10; ccount++)
{
RxData[ccount] = Read2USART();
}
I cant see the difference,
Any thoughts??
Thanks
- - - Updated - - -
Its Ok i solved it,
For any one else with a similar issue you need to poll the receive bit and only call the Read2USART when new data is ready