Author: shelldozer

Cherryside Addendum #1 – Others Bodges

Although Retrochallenge 04/2017 finished a few weeks ago, I have carried on with my project, making some improvements to my PS/2 keyboard interface for the 68HC11 microcontroller. Expanded-Mode Compatible In particular, I now have the hardware interface working using only PORTA (pins 3 and 7, using the pulse-accumulator for the input-clock and the bidirectional-capable pin PA3 for … Continue reading Cherryside Addendum #1 – Others Bodges

With a Cherry on the Side – Lessons Learned (Dijkstra be Damned)

[A Project to interface a PS/2 keyboard to a 68hc11 microcontroller]This RetroChallenge project reached its' target - decoding, reading, and reporting PS/2 keyboard scancodes with a 68HC11 microcontroller using only internal resources (no external memory, no external I/O device controllers, no external logic, etc). I had picked a rather minimal project because I knew April would … Continue reading With a Cherry on the Side – Lessons Learned (Dijkstra be Damned)

With a Cherry On The Side – Episode Nine (Squinting Backwards)

[A Project to interface a PS/2 keyboard to a 68hc11 microcontroller] The Starting Situation By the previous episode, I was getting the right number of clock-pulses per PS/2 key event, but not all the scancodes received seemed correct, eg: Key Detected Scancode Expected Scancode Comment Q 0xA8 0x15 wrong W 0xB8 0x1D wrong E 0x24 … Continue reading With a Cherry On The Side – Episode Nine (Squinting Backwards)

With a Cherry On The Side – Episode Eight (Meet the Cherries)

[A Project to interface a PS/2 keyboard to a 68hc11 microcontroller] Disaster Strikes Well, wouldn't you know it? What a day for my 17-year-old Omnibook laptop to decide that it doesn't want to work anymore! The darned thing will charge the (brand new) laptop battery happily, but refuses to recognise that it is holding any … Continue reading With a Cherry On The Side – Episode Eight (Meet the Cherries)

With a Cherry On The Side – Episode Seven (All the Way to Eleven)

[A Project to interface a PS/2 keyboard to a 68hc11 microcontroller] Low-Level Interface Due to the slightly odd (not to mention a little inconvenient) low-level PS/2 keyboard hardware-interface, a little bit of ingenuity may be required: R1 and R2 are the pull-up resistors for the open-drain unidirectional CLK and bidirectional DATA signals. R3 and R4 … Continue reading With a Cherry On The Side – Episode Seven (All the Way to Eleven)

With a Cherry On The Side – Episode Six (the input-capture interrupt fires)

[A Project to interface a PS/2 keyboard to a 68hc11 microcontroller] Captures but No Interrupt After the tribulations of the last few days, I decided to change the program to display the value in the IC3 captured-value register (TIC3) - the last value of the free-running 16-bit hardware cycle-counter when the most recent IC3 pin-event … Continue reading With a Cherry On The Side – Episode Six (the input-capture interrupt fires)

With A Cherry on the Side – Episode Five (interrupts don’t happen at the worst possible time)

[A Project to interface a PS/2 keyboard to a 68hc11 microcontroller] Following on from the "final solution" plan described in the previous episode, the first step is to try to simulate incoming keyboard-clock interrupts. This can be done by using a pin of the output-only PORTB on the 68hc11 directly connected back to the input-capture … Continue reading With A Cherry on the Side – Episode Five (interrupts don’t happen at the worst possible time)

With A Cherry on the Side – Episode Four (a plan for the nitty-gritty)

[A Project to interface a PS/2 keyboard to a 68hc11 microcontroller] The Nitty-Gritty At the lowest level PS/2 keyboard interface is an active-clocked packetised serial bitstream using open-drain drivers, running at 10KHz-30KHz (frequency depends on keyboard, and can vary somewhat at runtime!). The clock signal is "idle-high". The keyboard provides the clock-signal for both directions, … Continue reading With A Cherry on the Side – Episode Four (a plan for the nitty-gritty)

With A Cherry On The Side – Episode Three (terminal setup and more hardware)

[A Project to interface a PS/2 keyboard to a 68hc11 microcontroller] Get Cracking! So I have the target microcontroller SBC, and have verified it is still working. Today I have been setting up more project equipment. First off, I will need to be able to run my favourite simple command-line 68HC11 cross-assembler to generate loadable … Continue reading With A Cherry On The Side – Episode Three (terminal setup and more hardware)

With A Cherry On The Side – Episode Two (How to run code from non-existent ROM)

[A Project to interface a PS/2 keyboard to a 68hc11 microcontroller] The Case of the Unmissing PROM Last time, I mentioned that there was something a bit unusual about my 68HC11E1 MCU, running the BUFFALO monitor program from on-chip PROM. Well, the issue is that the E1 model 68HC11 isn't supposed to have any on-chip … Continue reading With A Cherry On The Side – Episode Two (How to run code from non-existent ROM)