CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

LCD with PIC 18f4520 on PICDEM 2 PLUS demo board

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
that guy
Guest







LCD with PIC 18f4520 on PICDEM 2 PLUS demo board
PostPosted: Fri Feb 27, 2009 12:32 pm     Reply with quote

I'm tring to get the lcd screen to work using a pic 18f4520 on the PICDEM 2 PLUS demo board.
Here's my code
Code:
#define LCD_ENABLE_PIN PIN_A2
#define LCD_RS_PIN PIN_A1
#define LCD_RW_PIN PIN_A3
#define LCD_TYPE 2
#define LCD_TRIS_LOCATION TRISD
#include <lcd.c>

void main()
{
   lcd_init();

   setup_adc_ports(NO_ANALOGS|VSS_VDD);
   setup_adc(ADC_OFF|ADC_TAD_MUL_0);
   setup_psp(PSP_DISABLED);
   setup_spi(SPI_SS_DISABLED);
   setup_wdt(WDT_OFF);
   setup_timer_0(RTCC_INTERNAL);
   setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
   setup_comparator(NC_NC_NC_NC);
   setup_vref(FALSE);
   setup_oscillator(OSC_4MHZ|OSC_TIMER1|OSC_31250|OSC_PLL_OFF);

   lcd_putc("\fReady..\n");

}


What's my problem!?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Feb 27, 2009 12:39 pm     Reply with quote

Which version of the PicDem2-Plus do you have ?

The new Rohs version looks like this. It has silver pads in the bottom of
the prototyping area on the right side of the board:
http://www.microchipdirect.com/ProductSearch.aspx?Keywords=DM163022

The older non-Rohs version doesn't have that. It looks like this:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010072

If you have the Rohs version (or the non-Rohs version), then see the
following link. It has code for an lcd driver, and also tells how to make
it work if you have the "Rohs" version of the PicDem2-Plus board.
http://www.ccsinfo.com/forum/viewtopic.php?t=24661
that guy
Guest







PostPosted: Fri Feb 27, 2009 12:41 pm     Reply with quote

the Rohs version
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group