I do not know of a test.
Post your code and connections/schematic.
Maybe we will be able to see the problem.
I do not know of a test.
Post your code and connections/schematic.
Maybe we will be able to see the problem.
Dave
Always wear safety glasses while programming.
Here is what I have:
Pin connections are as follows:Code:DEFINE OSC 20 @ __CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L @ __CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H @ __CONFIG _CONFIG2L, _PWRT_OFF_2L & _BOR_OFF_2L & _BORV_3_2L & _VREGEN_ON_2L @ __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_32768_2H @ __CONFIG _CONFIG3H, _CCP2MX_ON_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H @ __CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _ICPRT_ON_4L & _XINST_OFF_4L loopcount var word ;----[ Change these to match your LCD ]--------------------------------------- LCD_DB4 VAR PORTE.1 LCD_DB5 VAR PORTA.3 LCD_DB6 VAR PORTA.4 LCD_DB7 VAR PORTE.2 LCD_RS VAR PORTD.3 LCD_E VAR PORTA.5 LCD_Lines CON 2 ' # of Lines on LCD, 1 or 2 (Note: use 2 for 4 lines) LCD_DATAUS CON 50 ' Data delay time in us LCD_COMMANDUS CON 2000 ' Command delay time in us INCLUDE "LCD_AnyPin.pbp" ; *** Include MUST be AFTER LCD Pin assignments **** ; ;----[ Your Main program starts here ]---------------------------------------- 'LoopCount VAR WORD PAUSE 500 : LCDOUT $FE,1 : PAUSE 250 ; Initialize LCD (You may not need this, ; but some displays are picky) ; Main: LCDOUT $FE,1 ; clear screen LCDOUT $FE,$87,"Hello,",$FE,$C8,"From DT!" ; FOR LoopCount = 0 TO 65535 LCDOUT $FE,$80, IDEC LoopCount LCDOUT $FE,$C0, IHEX4 LoopCount NEXT LoopCount GOTO Main
1 VSS
2 VDD
3 10K POT
4 PORTD.3
5 VSS
6 PORTA.5
7 N/C
8 N/C
9 N/C
10 N/C
11 PORTE.1
12 PORTA.3
13 PORTA.4
14 PORTE.2
15 N/C
16 N/C
Did you turn the ADC off someplace ?
Dave
Always wear safety glasses while programming.
That's the entire code. I rechecked everything and everything looks okay. I bought two LCD's so when I get home I'll try the other one. I don't know what else I can check. I have an old Mikroelectronica board that has pins for parallel LCD's so maybe I'll use that with the standard code (all pins on the same port) to see if it's my hardware or software that's causing the issue.
Last edited by Christopher4187; - 5th September 2012 at 17:16.
With those configs ... the PIC is running at 48mhz, not 20.
So change the DEFINE OSC 20 to DEFINE OSC 48.
And like Dave mentioned ... add ADCON1 = $0F before the LCD pins/include.
DT
Christopher, I had all my wiring correct and the code looked good but I still had no display. The problem was Vo. The contrast was a critical adjustment. Once I found the sweet spot, just above 0 VDC, all was well.
I've attatched a txt file with the code to test the LCD using E1 & E2, no other hardware needed. R/W can be tied to GND or to an output. Make the necessary VAR pin assinment changes. This code will write to all four lines without using LCDOUT command.
Wayne
Newhaven_4x40_Test Code (1).txt
Last edited by mackrackit; - 7th September 2012 at 22:31. Reason: Updated attachment by request.
I've tried everything you guys suggested and still no dice.
I went back to the normal LCDOUT commands where I have everything on PORTB. I've tried my Easypic3 board and the 2X16 LCD that came with it, along with 3 other LCD displays I had laying around. I get one line of solid characters, which of course is adjustable with the contrast POT on the board. The LED blinks as intended but nothing on the LCD screen. Do I need to pull up or down any other lines? Is there anything else I can check?
I'm thinking it might be my files or programmer, but my other programs program just fine. I even reinstalled the PBP file that I modified last night for DT's program but I get the same results. Anything else I can check?
Nevermind, I'm an idiot. I got the Easypic3 board working and now I'll move onto trying to make the NewHaven LCD screen work.
I can confirm all LCD's work on the Easypic board but I can't get any to work on the demo board. Can someone check my modified pbppic18 file to see if it's correct? I can't tell if I have a hardware issue or a software issue.
> DT > The modifications were correct.
Copyrighted file removed.
Last edited by Darrel Taylor; - 6th September 2012 at 00:53.
Bookmarks