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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/18/06 21:50
Read: times


 
#114483 - I have accounted for this
Responding to: ???'s previous message
The LPC is 3V3. Do you have the 232 supplied with 5V, otherwise that's it and you must replace the 232 with a 3V3 chip.


Yes they run off different voltages with common ground. I have tested and my uC can send and receive.

a) the interrupt is enabled (EA and ES plus one more if you use split interrupt)


Both EA and ES are enabled. I am not splitting the interrupts (SSTAT = 0x00)

b) you are using the right ISR (the LPC has 2 [RI and TI] if so configured)


In my ISR (which works with TI) I check which one is enabled (RI or TI)

c) no higher priority (by IP or "list") is constantly active


No other interrupts are active.

d) REN is set


REN is set. My SCON is 0x50 (Mode 1 UART, REN enabled)

Hardware



I actually did get my code from Code Architect.


After doing some more testing I have discovered that if I continuously check for RI being enabled in my idle loop, it does get enabled when key is pressed. But if I take that out and try to let my ISR take care of it, it does not get detected.

Here is what my ISR looks like:

void uart_isr
  (void) interrupt 4 using 1
{
if (RI)
  {
    RI = 0;
    uartGet = SBUF;
    LCD_Command(0x0C,uartGet);
  } 

  if (TI)
  {
    TI = 0;
    mtxbusy = 0;
  }
}


If you are interested this is my UART transmit function that works fine.

void uart_transmit
  (unsigned char value)
{
  while(mtxbusy);

  mtxbusy = 1;
  SBUF = value;
}



Thank you for the tips though.

List of 15 messages in thread
TopicAuthorDate
P89LPC922 UART            01/01/70 00:00      
   correct if            01/01/70 00:00      
      I have accounted for this            01/01/70 00:00      
         this may be the culprit            01/01/70 00:00      
            Yes!!!            01/01/70 00:00      
      P89LPC922 UART Solution            01/01/70 00:00      
         Isolation - Not generally necessary            01/01/70 00:00      
         what things            01/01/70 00:00      
            Opto-Isolators            01/01/70 00:00      
            These things?            01/01/70 00:00      
   Polling UART            01/01/70 00:00      
      fine, but that is NOT the question            01/01/70 00:00      
      What about interrupts?            01/01/70 00:00      
         About interupts            01/01/70 00:00      
            I'd say THE plan            01/01/70 00:00      

Back to Subject List