aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/cpu.ts (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix(gpio): CBI/SBI handling in writes to PIN register #103Uri Shaked2021-09-071-4/+4
| | | | fix #103
* feat(timer): external timer support #97Uri Shaked2021-08-151-2/+1
| | | | | | also refactor timer/GPIO interaction to be more generic. close #97
* feat(gpio): external interrupt/PCINT support (#82)Uri Shaked2021-07-071-0/+2
| | | close #70, #84
* perf(cpu): speed up event systemUri Shaked2021-06-201-25/+47
| | | | | | Use a linked list instead of array. This makes the simulator runs almost twice as fast in case of timers with prescaler of 1, e.g. when using the TVout library. In addition, we use a pool of clock event objects to avoid expensive GCs.
* 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