Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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

List of 30 messages in thread
TopicAuthorDate
UART0 interrupt not generating            01/01/70 00:00      
   you never start a timer for the UARTs            01/01/70 00:00      
      i have set it in another init funtion            01/01/70 00:00      
         That sounds fishy, you set SCON0, but            01/01/70 00:00      
   sometimes, you are better off "growing"            01/01/70 00:00      
      i trimmed and tried            01/01/70 00:00      
         get rid of the stupid putchar and what g            01/01/70 00:00      
   config()            01/01/70 00:00      
      but you STILL have the stupid putchar            01/01/70 00:00      
         sorry! complete details now            01/01/70 00:00      
            I will not            01/01/70 00:00      
   further simplified            01/01/70 00:00      
      this is most probably not the root cause            01/01/70 00:00      
         oops            01/01/70 00:00      
            the "printf" of embedded world...            01/01/70 00:00      
               yes LED is flashing            01/01/70 00:00      
                  Obscure code...            01/01/70 00:00      
                     Thank you Russell. At last I completed            01/01/70 00:00      
                        Excellent!            01/01/70 00:00      
                           clarity            01/01/70 00:00      
                        Is it now clear to you what simplificati            01/01/70 00:00      
                        but WHY?????            01/01/70 00:00      
                           the reason            01/01/70 00:00      
                              but, Erik,...            01/01/70 00:00      
                                 You STILL want to know why it is impossi            01/01/70 00:00      
                                    nono, I wouldn't say that            01/01/70 00:00      
                                       and - of course            01/01/70 00:00      
                                          the tool            01/01/70 00:00      
                                             Added to the List            01/01/70 00:00      
   the original problem            01/01/70 00:00      

Back to Subject List