Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
here is a code for a digital clock displayed in 6 7seg i developed it few weeks ago
makes sure to insert some delay between each display
/*******************************************************************/
void prepareCount(unsigned int decimal){
unsigned char hours,min,sec;
unsigned int...
Re: what is the difference between unsigned char and unsigned int in 8051 kiel compil
I tried this one before and it worked fine ...... i just want to figure out and learn why this happens when i declare it as a local variable
- - - Updated - - -
i noticed that when i declare it as a global...
Re: what is the difference between unsigned char and unsigned int in 8051 kiel compil
i couldn't debug the unsigned char variable as there is no generated assembly for it here is a simple program to test
void main()
{
unsigned char count = 0 ;
count++ ;
count++ ;
count++ ;
count++ ...
Re: what is the difference between unsigned char and unsigned int in 8051 kiel compil
I already know that unsigned char is 8 bits
while unsigned int is 16 bit
my problem is that why i couldn't debug the unsigned char
what is the difference between unsigned char and unsigned int in 8051 kiel compiler
while i'm trying to debug the code i noticed something wired
when i define the variable as unsigned char i noticed there is no generated assembly cod in the dis-assembly window
when i convert it to unsigned...
ok i removed this statement
- - - Updated - - -
To summarize:
i think my problem is that
1_ keep reading the RTC at high speed many times at each second
(any suggestions to solve this)
2_ using method 1 ... it seems i have to use the interrupt pin with it, and this method cann't be used...
i found the datasheet says also at the end of method 1 description
If this interrupt is used, the IRQF bit in Register C should be cleared before leaving the interrupt routine.
besides i tried the code without this statement and it has no difference
i added the first method as following but it result in more time error
weather i pooled on UF bit or IRQF
i thought i won't need the interrupt pin so i didn't connect it
while(1)
{
if((XBYTE[12] & 0x10)== 0x10){ //looping on UF bit
//if((XBYTE[12] & 0x80)== 0x80){ //looping on IRQF bit
sec =...
i think the time error is jumping not contentious , i need to check it again to make sure of that
i only write to register A and other time and date regester at initialization
here is the code
void RTC_init(void){
XBYTE[10] = 0x20; //turn on OSC
XBYTE[11] = 0x92; //BCD ,24h ,no dayLight...
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.