aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/cpu.ts (follow)
Commit message (Collapse)AuthorAgeFilesLines
* feat(usart): implement RX #11Uri Shaked2021-02-191-1/+2
| | | | close #11
* perf(cpu): speed up event systemUri Shaked2020-12-121-18/+28
| | | | ditch `array.sort()` and instead manually keep the array sorted when we insert a new item.
* fix(cpu): event system issueUri Shaked2020-12-121-2/+2
| | | | | | | `updateClockEvent()` and `clearClockEvent()` would sometimes mess up the list of events. This could cause unexpected behavior when you have multiple timers running. Also added regression tests for these methods.
* perf!: centeral timekeepingUri Shaked2020-12-091-1/+44
| | | | | | | | | 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.
* refactor: central interrupt handling #38Uri Shaked2020-12-091-3/+76
|
* feat(timer): Compare Match Output (#45)Uri Shaked2020-05-251-0/+4
| | | | | 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
* fix(timer): incorrect high counter byte behaviorUri Shaked2020-04-281-0/+8
| | | | | | 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
* feat(instruction): 22-bit PC support #31Uri Shaked2020-04-091-2/+16
| | | | adapt CALL, ICALL, RCALL, RET, and RETI for MCUs with 22-bit PC
* refactor: added peripherals and cpu feature folderslironh2020-03-221-0/+78