What It is: A program that simulates a PIC16F84 microcontroller in an Unix host, featuring: - Hexadecimal file input. - A text-mode "graphical" debugger. - Logic-analizer-like plotting of port A and port B signals. (X11 required) - Detailed core and peripheral emulation. - PAL video-game emulation. - Single pin sound output. Emulation includes: - uC Core: Pipelined execution: Prefetch, execution, prefech-discard. Sleep mode. PortA/B tristate behavior. - Timer module: Prescaler, writing delays, external clock, programmable edge. - Interrupts: Timer Overflow, RB0/INT, programmable INT edge, RB4-7 change. Awaking CPU. - Watchdog timer: Nominal 18ms watchdog timer. Prescaler. - EEprom: Writing unlock sequence. Nominal 4ms writing delay. Things not yet (and maybe never) emulated: - Open drain in RA4. - Pull-ups. - Power-up timer. - Code protection. (Stupid thing for an emulator/debugger :) - Oscillator start-up. Compilation: - Edit the Makefile file and select your IO interface. - set "IO=softvideo.o" for Rickards Guneé video hardware. - set "IO=io.o" for a minimal IO skeleton. - uncomment "SOUND = -DSOUND" for sound emulation. - If sound emulation is to be compiled edit the "sound.c" file. Select the correct SND_PORT and SND_BIT defines for your hardware. - Type "make". No non-standard libraries are needed during compilation. - X11 server is required to display waveforms and video emulation. - A sound driver is required for sound emulation. Tested systems: - Linux-386: Development platform. gcc-2.95.3 generates a buggy code. Use gcc-3.0.x instead. - Solaris-sparc: GNU tools OK. Use rxvt color terminal. Sound not yet tested. - Digital-unix-alpha: GNU tools OK. Tested on a remote machine: X11 behavior not known. No sound. To do: - External world interfaces. There are a lot of different hardware that can be attached to this microcontroller. I'm thinking about some sort of plug-in code. Never to do: - Windows port. Bugs: - Probably a lot. Do not use this code to control a nuclear reactor! - Bug reports are welcome, but do not expect a fast patched revision. Here is the code. You can patch it yourself. Copying: - This PIC16F84 emulator for Linux/unices is distributed under the GNU GPL license. About Author: Jesus Arias - E-mail: jesus@ele.uva.es - Web: http://www.ele.uva.es/~jesus - small-bio: spanish, 36 years, single. University professor. Electronics engeneering. Analog IC design. Computer fanatic since Apple ][ days.