??? 03/14/06 13:19 Modified: 03/14/06 13:26 Read: times |
#112121 - That sounds fishy, you set SCON0, but Responding to: ???'s previous message |
i put this power on initialisation code in some other funtion
that function initialises the clock, crossbar, ios timers, etc. That you "hide" parts of the code does not exactly make it easy to help you. Now, do not post 1000 lines of code nobody has the time to review that for free. Initialization of the clock and crossbar should be done at the very beginnimng of startup.a51 and thus be in assembler. it is not sending any characters on UART0. i get stream of characters 'E' on UART1. means buffer is full. That sounds fishy, you set SCON0, but I see no set of SCON1. Do yourself a favor, make a copy of your code, cut ALL extraneous stuff such as unsigned char com_tbuflen (void), t_in = 128, t_out = 0 and all other stuff not related to sending ON char. get rid of using putchar1, write directly to SBUF. That woy you will get a piece of manageable code to debug. (oscillator, crossbar, timer and UART - nothing else). If that code works, gradually include the stuff you have deleted (easy - you add from the original copy) till it fails and you will know where. If that does not work, there will be a complete piece of code that is within the range of what a forum participane (e.g. me) can manage to review. Fopr the first go, just do UART0, UART1 can be added later. Erik |