10.07.2015 Views

Designing a USB Keyboard with the Cypress Semiconductor ...

Designing a USB Keyboard with the Cypress Semiconductor ...

Designing a USB Keyboard with the Cypress Semiconductor ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Designing</strong> a <strong>USB</strong> <strong>Keyboard</strong>FoundKey1 ms ISRKey =KeyCodeTable[Column][Row]Clear Watchdog TimerCompare row bit <strong>with</strong>KeySwitchImage[Column][Row]3 ms ofbus inactivity?YesSave GPIO Portsettings. Write ‘0’ toColumn port bits.Key statusPressedReleasedNoKey is amodifier?Key inDebounceFIFO?NoYesNoEnable GPIO interrupts(falling edge) on Port 2Suspend until busactivity resumesYes Key ==LastTx?NoDisable GPIO interrupts.Restore port settings.YesPhantomkey situation?Yes1Set TxRequiredflag to TrueHas 4 mspast?YesSet Task to SCAN_TASKNoDebounce_FIFO[Debounce_Pointer]=KeyNoSet TxRequired flagto TrueKey is amodifier?YesSet TxRequiredflag to TrueSet ModifierByte in FIFOHas 12 mspast?YesIncrementDebounce_PointerNoNoLastTx = Key1Debounce_FIFO[Debounce_Pointer] =Illegal matrix indexEP1 FIFOfull?YesFill EP1 FIFO <strong>with</strong>01H (Rollover Error)NoAdd Key to EP1 FIFOReturnReturnFigure 24. FoundKey RoutineFigure 25. 1 ms ISR12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!