- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I have a question about adjusting a design for a PS/2 Keyboard/Mouse Interface that previously used 2 pins for clock and data (seperate In and Out) for the clock and data lines:
The signals were combined external to the PSoC:
The code I have written bit-bangs the PS/2 interface with the falling edge of the clock being the trigger to read data bits.
What I'd like to do is possibly change these to single Clock and Data lines to simplify the design.
I have a couple concerns:
1) If I merge ClkIn and ClkOut into a single pin (set for Input/Output - Open-drain drive low) will my Clock interrupt fire when I toggle the pin as an output? If so I will probably need to ignore the interrupt for when the PSoC has control of the clock? I'm already doing this for the existing design so it's not an issue if this is the case.
2) Both the mouse and Keyboard clock signals are on one port. Since (if I recall correctly) there's only one dedicated interrupt signal per-port, will I need to make special considerations to separate the two interrupts? Or would this all be taken care of by having two separate ISR components (one for keyboard clock, one for mouse clock)?
Thanks in advance for any tips. I want to make sure I have an understanding of the inner workings of how this will behave before I go ahead writing too much code.
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I wonder if something like below will work.
ISR will be triggered only when output_en = low.
moto