??? 11/01/09 20:32 Read: times |
#170316 - AT89C51RC2 |
Hi, I am using a AT89C51RC2 an I have a few doubts about the oscillator:
I understand that in 8051's standard mode you have 12 clocks per machine cycle. And in X2 mode you have 6 clocks per machine cycle. So, if I use a 12 Mhz crystal I will have 1 us of machine cycle and 0,5 us if I use X2 mode. The problem is that in page 15 (see figure 4)of this microcontroller http://www.atmel.com/dyn/resources/prod_documents/doc4180.pdf it says that there is an aditional 8 bit prescaler between the osc and fcpu. If this prescaler is set by default, fcpu=fperipherals=fosc/2 in standard mode or fcpu=fperiphericals=fosc in X2 mode. It seems to me that fosc is equal to crystal´s frecuency. I am not sure, because if you see page 15 figure 4 and then page 16 figure 5, you will see that fosc is marked at different points of the circuit. In case fosc is equal to crystal's frecuency, the machine cycle will be 2 us in standard mode and 1 us in X2 mode with a 12 Mhz crystal. And I think this is wrong My questions are: 1) Is this possible that fosc=fxtal * 2? In that case, everything will be as usual (fxtal=12 MHz will imply 1 us of machine cycle and not 2 us). 2) Do you know how disable this prescaler? I have read the manual but it doesn´t say anything about it. 3) What can you tell me about working with this microcontroller in X2 mode (especially the timers)? Are there any problems? I ask this because ATMEL says in his erratasheet http://www.atmel.com/dyn/resources/prod_documents/doc4181.pdf that may be some trouble while working with timer 2 in X2 mode Thank you in advance |
Topic | Author | Date |
AT89C51RC2 | 01/01/70 00:00 | |
You didn't reply to this one...![]() | 01/01/70 00:00 |