I programmed a pic18f4685 to use the onboard UART to send out an Ascii(48)- FYI that's a zero - endlessly. 19200baud 8-N-1 Using a NorthMicro NM101 proto board.
void TX_UART(void)
{
unsigned char phrase[]="Press 0 to Exit\0";
unsigned char TX_Value;
lcd_clear();
lcd_goto(0x40);
lcd_puts(phrase);
lcd_goto(0x00);
// Initialize SPBRGH:SPBRG for 19200 baud BRGH =1 BRG16=0
SPBRGH = 0;
SPBRG = 64;
TXSTAbits.BRGH = 1;
BAUDCONbits.BRG16 = 0;
TXSTAbits.SYNC = 0;
RCSTAbits.SPEN = 1;
TXSTAbits.TXEN = 1;
while(KEYBOARD()!='0')
{
while(!TXSTAbits.TRMT)
{}
TXREG='0';
while(!TXSTAbits.TRMT)
{}
TXREG='0';
while(!TXSTAbits.TRMT)
{}
TXREG='0';
}
lcd_clear();
}
I've sampled pre-max232 chip off pin RC6 so it hasn't been inverted yet and is only at about .5 Vp-p.
According to internet sources I should be seeing a Start bit / LSB to MSB / Stop bit.
Base on that info I figured I should be seeing on the scope for Ascii(48) a signal like this: 1000011001 but I seem to have an extra bit(s). What am I missing? [Each 2 bits/Div]
When the signal is received by PuTTY it comes through fine-no glitches. I just want to understand why I'm seeing what I have and not what I expected.
