Datasheet

Ps2_Config
303
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure Ps2_Config()
Returns Nothing.
Description Initializes the MCU for work with the PS/2 keyboard.
Requires
Global variables :
- PS2_Data: Data signal line
-
PS2_In_Clock: Clock signal line in
- PS2_Out_Clock: Clock signal line out
- PS2_Data_Direction: Direction of the Data pin
-
PS2_Clock_Direction: Direction of the Clock pin
must be defined before using this function.
Example
// PS2 pinout definition
dim PS2_Data as sbit at PINC.B0
dim PS2_In_Clock as sbit at PINC.B1
dim PS2_Out_Clock as sbit at PORTC.B1
dim PS2_Data_Direction as sbit at DDRC.B0
dim PS2_Clock_Direction as sbit at DDRC.B1
// End of PS2 pinout definition
...
Ps2_Config() ' Init PS/2 Keyboard