Jun 23, 2003 #1 N neuralc Full Member level 4 Joined Nov 6, 2001 Messages 236 Helped 9 Reputation 18 Reaction score 3 Trophy points 1,298 Activity points 2,202 M41T00 C code (ht-picc) Hi all, Some one have a library/c code for ht-picc to read and write time's and data to the M41T00 RTC ? ThX NeuralC
M41T00 C code (ht-picc) Hi all, Some one have a library/c code for ht-picc to read and write time's and data to the M41T00 RTC ? ThX NeuralC
Aug 28, 2003 #2 N neuralc Full Member level 4 Joined Nov 6, 2001 Messages 236 Helped 9 Reputation 18 Reaction score 3 Trophy points 1,298 Activity points 2,202 Hi all, Working C code for PIC16F87x (100Khz for XTAL 10Mhz). Configure: InitI2C(); Read RTC: aux_buff[0]=1; GetI2C(0xD0, 1, 2, aux_buff); seconds=0; minutes=BcdToDecimal(aux_buff[0]&0x7f); hours=BcdToDecimal(aux_buff[1]&0x3f); Write RTC: aux_buff[0]=1; aux_buff[1]=DecimalToBcd(minutes); aux_buff[2]=DecimalToBcd(hours); SendI2C(0xD0,3,aux_buff); NOTE: RC3 and RC4 should be Outputs. Hope Helps, NeuralC
Hi all, Working C code for PIC16F87x (100Khz for XTAL 10Mhz). Configure: InitI2C(); Read RTC: aux_buff[0]=1; GetI2C(0xD0, 1, 2, aux_buff); seconds=0; minutes=BcdToDecimal(aux_buff[0]&0x7f); hours=BcdToDecimal(aux_buff[1]&0x3f); Write RTC: aux_buff[0]=1; aux_buff[1]=DecimalToBcd(minutes); aux_buff[2]=DecimalToBcd(hours); SendI2C(0xD0,3,aux_buff); NOTE: RC3 and RC4 should be Outputs. Hope Helps, NeuralC
Mar 21, 2011 #3 R RajS Newbie level 5 Joined Mar 10, 2011 Messages 8 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,326 I need to write to and read from an external EEPROM ( AT24C512 ) using PIC16F877. I am having a project, please help....... I use HI-TECH C COMPILER......
I need to write to and read from an external EEPROM ( AT24C512 ) using PIC16F877. I am having a project, please help....... I use HI-TECH C COMPILER......