You start by reading the datasheet, writing small test programs, then you pull it all together. That is how we did it. It is the only way, and there are not many shortcuts.I am starter to Microcontrollers . In general Most of people Start with Microcontrollers AT89C51, But i choose to learn Sillabs. I want learn interrupts ,timers, adc,dac and other peripherals like spi i2c perfectly.
Yes, the datasheet is your friend here. Take a look at page 309 in the datasheet https://www.silabs.com/Support Documents/TechnicalDocs/C8051F12x-13x.pdf
What you want is autoreload. (You can reload the timers manually for every overflow too). Look at the first table, Timer2,3,4 can be set to 16 counter/timers with auto-reload. Then you need to figure out how fast your timer is ticking. After you have figured out what your sysclk is, what clk source and/or clkprescaler you know the tick time. There are Frequency equations too in the datasheet. From the Auto-Reload section: "When counting up, the counter/timer will set its overflow/underflow flag (TFn) and cause an interrupt (if enabled) upon overflow/underflow, and the values in the Reload/Capture Registers (RCAPnH and RCAPnL) are loaded into the timer and the timer is restarted.". If you search the document for "reload", you'll find tables with reload values for different baud-rates for UARTs. I've never looked at this chip and never into silicon labs datasheets before and I must say I like it.
|Thread starter||Similar threads||Forum||Replies||Date|
|D||Why does the Darlington transistor get so hot?||General Electronics Chat||52|
|Does the CD4051 Analog Multiplexer work with 3.3v?||Datasheets, Manuals & Parts Identification||6|
|M||How does this even work? All the D+ & all the D- are connected?||General Electronics Chat||4|
|Does the Z8003 CPU exist?||Digital Design||12|
|Why does one synchronous motor lock to same phase angle and one locks randomly||General Electronics Chat||5|
by Luke James
by Luke James