Hi,
I think I found some minor issues with the ATMega 1284P and Timer1-Capture-Mode as well as Timer3:
1.) For TIMER3 the variable "TIFR3" (and possible the associated bit-names like "ICF3" etc.) is not defined and thus cannot be set or read with its name.
I had to use the register-adress (0x18/0x38)
2.) When an ICP1-interrupt is generated mannually in the simulator, the content of the TIMER1/COUNTER1 (TCNT1) is [u:7ecfa4ab3e]not [/u:7ecfa4ab3e]copied to the CAPTURE1 register ICR1.
3.) When Bit6 in register TCCR1B (ICES1=Input Capture Edge Select) is toggled, the ICF1 (Input Capture Flag 1) is set in reality, but not in the simulator!
This information is well hidden in the last 2 sentences of section 14.6.3. "Using the Input Capture Unit" in the datasheet of the ATMega1284P.
4.) To [u:7ecfa4ab3e]clear [/u:7ecfa4ab3e]the ICF1-bit in TIFR1, a "[u:7ecfa4ab3e]1[/u:7ecfa4ab3e]" has to be written to the bit. But writing a "1" in the simulator does not clear the ICF1-flag, but sets it!
This behaviour might also be present with some or all of the other Interrupt-Flags.
5.) When using the Variables COUNTER0, COUNTER1, COUNTER2 and COUNTER3 all get different colors in the editor (Blue, red, black).
This is of course only a cosmetical issue, but (especially for COUNTER3 written as black) is a bit disturbing.
The identical variables TIMER0, TIMER1,TIMER2 and TIMER3 in contrast are all consistently coloured red.
I might have overlooked or misinterpreted something.
So please could someone confirm my issues.
[b:7ecfa4ab3e][color=red:7ecfa4ab3e](BASCOM-AVR version : 2.0.7.6 )[/b:7ecfa4ab3e][/color:7ecfa4ab3e]
↧