Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
hi dj i used these lines printf(lcd_putc,"\f %4u"asd);
the display shows
0-20,40,60...240 and then 4,24,44,64...244 and then 8,28,68.....248and then 12 ,32,52,92....252 and then16,36,56...236 and then again 0 then repeat the process finally 236
what is the datatype has been used for asd...
Because it seems that the value in the asd can be maximum 8-bit so after 8bit i.e. 255 it is overflowing and starts from 0 again..
It is not having any problem related to LCD because LCD if it is showing the data for 3 digit it will show for the 4 also...
And if you count in your case it is happening the same way i.e. 236+20 = 256 which exceeds 255 and it is overflowing...
I have not tried this code... But I think these will work...
void write_16bit(eeprom_location, int16_data)
{
write_eeprom(eeprom_location + 1, int16_data & 0xFF);
int16_data >>= 8;
write_eeprom(eeprom_location, int16_data & 0xFF);
}
This word is mapped in program memory location 2007h. This address is beyond the user program memory space. This word can be accessed only during programming.
The following system requirements of PIC can be designated by the configuration word.
View attachment 66368
CP1,CP0 : Flash Program Memory Code Protection Bits.
All of the CP1:CP0 pairs have to be given the same value to enable the code protection scheme listed.
11 : Code protection off
10 : 1F00h to 1FFFh code protected
01 : 1000h to 1FFFh code protected
00 : 0000h to 1FFFh code protected
DEBUG : In-Circuit Debugger Mode
1 : In-Circuit Debugger disabled, RB6 and RB7 are general purpose I/O pins.
0 : In-Circuit Debugger enabled, RB6 and RB7 are dedicated to the debugger.
WRT : Flash Program Memory Write Enable
1 : Unprotected program memory may be written to by EECON control
0 : Unprotected program memory may not be written to by EECON control
LVP : Low Voltage In-Circuit Serial Programming Enable bit
1 : RB3/PGM pin has PGM function, low voltage programming enabled
The high voltage programming mode is always available, regardless of the state of the LVP bit.
0 : RB3 is digital I/O, High Voltage on MCLR must be used for programming
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.