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 support@ccsinfo.com

DS1307 with FORCE_HW (solved)

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jan 28, 2007 10:22 am     Reply with quote

Quote:
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);

This is all CCS Wizard code. The setup_spi() statement shown
above in bold will shut down the SSP module. That includes
shutting down the hardware i2c. Delete that line.
Philosopher



Joined: 28 Jan 2007
Posts: 6

View user's profile Send private message

PostPosted: Sun Jan 28, 2007 10:45 am     Reply with quote

Ahh.. that's it!
Thank you PCM programmer!
domdom



Joined: 06 Sep 2006
Posts: 29

View user's profile Send private message

PostPosted: Fri Feb 16, 2007 6:51 am     Reply with quote

what type of LCD you are using? i am currently using LCD 2x16 connecting to ds1307.
can this code be used in my application?

based on the software given by philosopher, pin DB0-DB7 of LCD connecting to which I/O ports of PIC?
Philosopher



Joined: 28 Jan 2007
Posts: 6

View user's profile Send private message

PostPosted: Fri Feb 16, 2007 12:13 pm     Reply with quote

domdom wrote:
what type of LCD you are using? i am currently using LCD 2x16 connecting to ds1307.
can this code be used in my application?

based on the software given by philosopher, pin DB0-DB7 of LCD connecting to which I/O ports of PIC?


I'm using a 4x16 display with a KS0066 controller chip. I believe that chip is compatible with HD44780.

You could use this code but I would recomend you to use the CCS or some other complete driver for this display instead. This is just me messing around.

If you use this code you should connect DB0-DB7 to port D.
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