Search This Blog

Sunday, July 29, 2018

ChibiTerm - The Plane! The Plane! - PCB arrives

Projects / ChibiTerm  Original post date: 04/12/2016

I have moved the video waveform to the video buffer log.

I have uploaded a snapshot of what I have on GitHub. I am still a noob at git.

There hasn't been much feature changes from the dumb terminal demo. I haven't quite get to implementing the ANSI Escape sequence. The changes are mostly structural. Now that the PS/2 code are a bit more tested, I think I should post a snapshot just in time for the first HaD 2016 prize deadline.

A new PCB incorporating the mod has been uploaded to OSH Park. I have not ordered/tested the new layout, but the changes are minimal so it should work. I have done some component consolidation.

Still waiting for the rest of my parts to show up from China. :(

I did some code clean up and found the bug in the way I am sending the PS/2 commands. I have initialize my state variable for the IRQ incorrectly. I forgot to update part of the code as the bit counting was at one point counting down is now counting up. The keyboard then sends an ACK in respond to the command sent, but the IRQ still thinks it is still sending so it misses that. Eventually the timeout kicks in to reset things.

That bug hangs most of the keyboards as they expect a second parameter to come in. This unfortunately didn't happen on the KVM which I did most of my testing on as its own uC handles things differently.

The keyboard LED update routines are now working for my keyboards including IBM M2, USB keyboard from the dollar store, Digital Equipment PS/2, IR based wireless PS/2 keyboard and my KVM switch. I had to tweak some timing parameters e.g. add a slight time delay before sending PS/2 commands as sometimes that overwhelms the uC in the KVM and IR keyboard as they have extra work load.

I know I am on the right track when the new code works and is smaller. Now I can work on the high level PS/2 decoding routine some more.

The PCB arrived yesterday. I'll try to assemble it later on today. My parts from China won't arrive for a while, but I'll make do with what I have. They managed to include the 16 mils REFDES and have perfect alignment. I usually turn those off for Chinese PCB house.

Size comparison - on top of a "Credit card" cardboard cutout from junk mail
The PCB was assembled and the blinking cursor shows up. :) I am making some minor changes to the PS/2 hardware as I totally forgot about USB keyboard support. I also need to do some more work with the PS/2 driver.

Size comparison: 28-pin EEPROM, 28-pin ATMega8 and ChibiTerm over fake credit card from junk mail.


V.1 mods and changes:

changes to pull ups
  • Originally the pull down helps to lower these signals as a cheat for the pins not being 5V tolerant. I need to change the 4.7K into pull ups as USB keyboards look at logic level on power up to change into PS/2 mode.
  • The zeners drags down the voltages too much. I have removed them. The new design uses Schottky diodes to clamp the PS/2 signals to 3.3V+0.3V.
  • For now, I am keeping the zener diodes on the USART lines for testing.
The current flowing through each of the diodes is around 0.79mA which is well within what the STM32F030 spec. I could have used 3.9V or higher Zener diodes, but they are not on sale on Aliexpress. Zeners should be used under pre-biased.

This is what the mod looks like. D3 is BAT54C or equivalent common cathode Schottky diodes.


I'll release a new layout after debugging is done.

Aside from the PS/2 firmware issue and the mod, the PCB works as expected.

This version of the PCB is available from OSH Park.  I don't think I have updated the layout.

Order from OSH Park

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.