Re: Code for Send/Receive TTL/Comport Sample?
18F4550, using a 4mhz Resonator (HS) No PLL Div. , LCD_D.bas is just the defines for the LCDOUT on PORT D, I'll paste that below for notation. No I didnt do a TRIS for the TX/RX there was a article saying it wasnt needed, but I can add it. I dont have a scope/anaz to use right now, ON the PC Side, i have tried 3 programs, the one I wrote which is only like 4 lines of code, and 2 com prt programs, they all do the exact same thing so I think its either the pic program, or the new cable I just got. Ive also tried adding resistors in series with TX/RX incase of overload, no change, also tried adding pull up resistors, no change.
I just added TRISC = %10000000
still not working
LCD_D.BAS
Code:
DEFINE LCD_DREG PORTD ' LCD Data bits on PORTD
DEFINE LCD_DBIT 0 ' PORTD starting address
DEFINE LCD_RSREG PORTD ' LCD RS bit on PORTD
DEFINE LCD_RSBIT 5 ' LCD RS bit address
DEFINE LCD_EREG PORTD ' LCD E bit on PORTD
DEFINE LCD_EBIT 4 ' LCD E bit address
DEFINE LCD_BITS 4 ' LCD in 4-bit mode
DEFINE LCD_LINES 4 ' LCD has 4 rows
PAUSE 1000 ' Wait 1sec for LCD to initialize
LCDOUT $FE, 1 ' Clear LCD
Last edited by wdmagic; - 2nd July 2013 at 07:05.
Chris
Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."
Bookmarks