PBP code for PS/2 emulation
showed the carrot and now missing in action.
Where is the guy with the PBP code ?
The code is right in this thread
Hi,
The code is right in this thread as a zip attachment. I used it along with DT's Interrupt system and it worked fine.
PS/2 to 18F4620 timing issues with mytekcontrols code?
Hello!
I have implemented the wonderful code PS/2 keyboard code from mytekcontrols in my PIC18F4620. It will only work if I set
TOcntDLY CON to a value of 100 (originally set to 10 per mytekcontrols).
Furthermore, if I hit and hold any of the these three keys (Caps Lock, Num Lock, or Scroll Lock), there is no response from the keyboard LEDs and the program just hangs. These keys will work if I hit them VERY quickly (less than .1 second - just hit with a glancing blow).
Everything else works as it should (with the CON change above).
Is this a big timing issue for me? Settings when programming?
Reference:
PIC 18F4620
Internal OSC at 8Mhz
OSCCON = %01110010
BUT even with an external 20Mhz oscillator, same performance, still hangs!
I sense severe timing issues. I will welcome all suggestions with regard to fixing this code for me.
Thank you to all,
Bob Pigford
Newark, Delaware
PS/2 to 18F4620 timing issues with mytekcontrols code?
Thank you sougata,
Quote:
Originally Posted by
sougata
Hi,
I used it on a 40MHz oscillator and did not have any issue. However the following may be considered:
1. Allow enough time (2 seconds or more is safe) before calling the PS2init routine. Your keyboard needs this to boot-up. Indicated by all three LEDs flashing and going off.
2. The characters are stored using interrupts but the interrupts are re-enabled only when parse it. This may cause the keyboards internal buffer to be overwhelmed.
I did allow enough time for the keyboard to start. I see the LEDs flash, so I think that is not the issue.
I will follow you suggestion and look into the buffer situation. I will also order a 40mhz oscillator just to be sure.
I will report back on my progress.
Thank you again,
Bob Pigford
Newark, Delaware, USA
PS/2 to 18F4620 timing issues isolated to "putkey" routine
Quote:
Originally Posted by
BobPigford
Thank you sougata,
I did allow enough time for the keyboard to start. I see the LEDs flash, so I think that is not the issue.
I will follow you suggestion and look into the buffer situation. I will also order a 40mhz oscillator just to be sure.
I will report back on my progress.
Thank you again,
Bob Pigford
Newark, Delaware, USA
I just isolated the issue! If I eliminate any output going TO the keyboard, everything works just fine! I disabled the "putkey" routine buy placing a "RETURN" immediately after the beginning of the routine.
Even with the internal oscillator at 8mhz, it all works very well (even with "TOcntDLY set back to 10)! I can live without seeing the LEDs on the keyboard for now. When my 40mhz oscillator arrives, it will try it again and report back.
Regards,
Bob