Thanks Henrick,
I knew better with the array numbering I just dropped the ball. As for the Word sized array I also realize that the Tx register is only 8 bits. It will be taken care of in the function routines.
While TXSTA.1 = 0 : WEND that rocks thank you.
Next question, I am switching this project over to 40Mhz and so I need to reconfigure timers. In the Modbus.txt file above, at the end it has a If Then statement that looks for a 10mS delay between Rx interrupts. This delay means that the modbus frame of characters is over. The comment says 10mS but for the life of me I cannot figure out where this comes from. It uses a 20Mhz OSC. It uses tmr2 with a 1:16 prescaler and then a variable that increments 1 time every time PIR1.1 is true. All I should have to do when switching from 20 to 40Mhz is take the 120 x 2 and use that value. But I would like to understand how it is getting 10mS.
20000000/4=5000000 1/5000000=200nS 200nS*16= 3.2uS and 3.2uS*120=384uS




Bookmarks