Skip to content

Simulates an HP-45 calculator. Can be ported to embedded project like STM32 etc.

License

Notifications You must be signed in to change notification settings

reiyawea/HP-45-emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HP-45 emulator

Simulates the CPU of an HP-45 calculator. Can be ported to embedded project like 8051, AVR, ARM CM3, etc.

Features

  • Written in plain C: platform independent.
  • All memory and CPU states are wrapped in struct: supports multi-instance.
  • Easy to use: only 5 functions in user interface.
    • hp45_key_down and hp45_key_up: notify CPU that a key is pressed/released.
    • hp45_init: initializes instance struct.
    • hp45_run: performs a single step.

Usage

To simulate the HP-45 at actual speed:

  1. call hp45_init once
  2. call hp45_run once per 286us (precisely speaking, 35 times per 10ms).
  3. (optional) call make_display to convert CPU registers into display buffer for LED scanning.

About

Simulates an HP-45 calculator. Can be ported to embedded project like STM32 etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages