The PORTC UART pins on the K50 have analog capability, so try turning that off with ANSELC = 0
The PORTC UART pins on the K50 have analog capability, so try turning that off with ANSELC = 0
I skipped some of the code for brevity's sake; here is my PORT SFRs:
Code:; --- *** PORT Related SFRs *** ---------------------------------------------------------------------------------------- TRISA = %01000000 TRISB = 0 TRISC = %11000000 ANSELA = 0 ANSELB = 0 ANSELC = 0
Just to make sure I'm following you...So the PC->K50 USB is ok... you see "ATZ", but the K50 uart TX is what's wrong? The above should have been "ATZ"?From the K50, the logic analyzer shows 0xA5, 0x8A, 0x96, 0xAC
I'll look back over the uart setup, but in the meantime try transmitting a "U" (0x55) on the uart and measure the bit times with a scope
At 38400 bit times should be ~26usCode:txtest: DO LOOP WHILE PIR1.4 = 0 TXREG1 = $55 GOTO txtest
I finally got it working. The big thing was it seems I missed traces on 2 of the ELM327 board that tie pins 5 & 6 to Vdd. Pin 5 holds the memory while pin 6 is the Baud selector. Ran a jumper on the bottom of the board and now it works.
Bookmarks