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 18F4525

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







LCD WITH 18F4525
PostPosted: Wed Oct 18, 2006 11:55 am     Reply with quote

I made a code for 16f877A, this code is simulated with Proteus and assemble in protoboard and good run, but the same code for 18f4525, with the library changed the for family 18f, don´t run.


PIC 18F4525.H
---------------------------------------------------------------
---------------------------------------------------------------
#include <18f4525.h>
#fuses XT,NOWDT,NOPROTECT,PUT,NOLVP,nobrownout/
#use delay (clock=4000000) //Fosc=4Mhzç
#use fast_io (B)
#use fast_io (A)
#use fast_io (D)
#include<lcd18f.c>
void main()
{

setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_OFF|ADC_TAD_MUL_0);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_wdt(WDT_OFF);
setup_timer_0(RTCC_INTERNAL);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
setup_comparator(NC_NC_NC_NC);
setup_vref(VREF_LOW|-2);
setup_low_volt_detect(FALSE);
setup_oscillator(False);

lcd_init();
printf(lcd_putc,"\Hello");
}

PIC 16f877a. This code run in protoboard
---------------------------------------------------------------
---------------------------------------------------------------
#include <16f877a.h>
#fuses XT,NOWDT,NOPROTECT,PUT,NOLVP,nobrownout/
#use delay (clock=4000000) //Fosc=4Mhzç
#use fast_io (B)
#use fast_io (A)
#use fast_io (D)
#include<lcd2.c>
void main()
{

setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);


lcd_init();
printf(lcd_putc,"\Hello");
}
--------------------------------------------
-----------------------------------------
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