aboutsummaryrefslogtreecommitdiff
path: root/src/peripherals/timer.ts (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-10-29fix(timer): setting TCNT doesn't update OCRA #111Uri Shaked1-0/+8
2021-10-07feat(timer): Force Output Compare (FOC) bitsUri Shaked1-0/+34
2021-09-14feat(timer): 3rd output compare (OCRnC) #96Uri Shaked1-13/+96
2021-08-15feat(timer): external timer support #97Uri Shaked1-16/+50
also refactor timer/GPIO interaction to be more generic. close #97
2021-07-07fix(timer): only set ICR hook for 16-bit timersUri Shaked1-3/+3
The ICR (Input Capture Register) only exists for 16-bit timers.
2021-06-19fix(timer): Timer1 PWM issues #94Uri Shaked1-2/+2
close #94
2020-12-29fix(timer): delay() is inaccurate #81Uri Shaked1-8/+1
fix #81
2020-12-27fix(timer): Output Compare in PWM modes #78Uri Shaked1-56/+110
close #78
2020-12-26fix(timer): Overflow interrupt fires twice #80Uri Shaked1-1/+5
fix #80
2020-12-25fix(timer): Output Compare sometimes misses Compare Match #79Uri Shaked1-6/+14
fix #79
2020-12-21fix(timer): Output Compare issue #74Uri Shaked1-4/+5
output compare doesn't work when the OCR register (OCRnA/OCRnB) equals to 0 fix #74
2020-12-20fix(timer): TOV flag does not update correctly #75Uri Shaked1-17/+21
fix #75
2020-12-20fix(timer): OCR values should be buffered #76Uri Shaked1-6/+33
fix #76
2020-12-12fix(timer): Incorrect count when stopping a timerUri Shaked1-14/+21
fix #72
2020-12-09perf!: centeral timekeepingUri Shaked1-5/+25
This should improve performance, especially when running simulations with multiple peripherals. For instance, the demo project now runs at ~322%, up from ~185% in AVR8js 0.13.1. BREAKING CHANGE: `tick()` methods were removed from individual peripherals. You now need to call `cpu.tick()` instead.
2020-12-09refactor: central interrupt handling #38Uri Shaked1-36/+42
2020-11-14feat: Support for simulating ATtinyx5 (e.g. ATtiny85) timers #64Uri Shaked1-12/+33
close #64
2020-11-14fix: AVRTimerConfig interface not exported #65Uri Shaked1-1/+1
close #65
2020-09-02perf(timer): speed up interrupt handlingUri Shaked1-1/+4
2020-09-02perf(timer): improve timer speedUri Shaked1-2/+5
cache the value of the clock divider
2020-08-01fix(timer): keeps counting even when stopped #41Uri Shaked1-0/+2
2020-05-25perf(timer): improve tick() performanceUri Shaked1-3/+4
reduce the number of calls to TIFR/TIMSK getters
2020-05-25feat(timer): Compare Match Output (#45)Uri Shaked1-32/+141
The Compare Match Output bits are used to generate hardware PWM signals on selected MCU pins. This is also the mechanism used by Arduino's analogWrite() method. See #32 for more details
2020-05-04fix(timer): stop Timer 2 when all CS bits are 0Uri Shaked1-1/+1
close #44
2020-04-29fix(timer): Reading TCNT in 2-cycle instructionsUri Shaked1-0/+1
close #40
2020-04-28fix(timer): incorrect high counter byte behaviorUri Shaked1-23/+19
According to the datasheet, the value of the high byte of the counter for 16-bit timers (such as timer 1) is only updated when the low byte is being read/written. close #37
2020-04-27style: reformat code with prettier 2.xUri Shaked1-10/+10
prettier rules have changed since we upgraded to 2.x
2020-04-27fix(timer): Timer value should not increment on the same cycle as TCNTn writeUri Shaked1-2/+8
close #36
2020-04-12test(timer): add more 16-bit timer testsUri Shaked1-10/+10
also fix some issues found by @gfeun and the tests
2020-04-12feat(timer): implement 16-bit timersUri Shaked1-23/+130
e.g. Timer/Counter1 on ATmega328
2020-03-22refactor: added peripherals and cpu feature folderslironh1-2/+2
2019-12-07refactor: tslint → eslintUri Shaked1-2/+2
2019-11-30fix: Wrong prescaler for Timer2Uri Shaked1-5/+30
fix #5
2019-11-30feat: Output Compare for TimersUri Shaked1-6/+78
close #4
2019-11-21feat: initial timer implementationUri Shaked1-0/+147
8-bit timers basic functionality + tests: 1. basic counting + prescaler 2. timer overflow 3. timer overflow interrupt