Datasheet
Ps2_Config
367
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void 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
sbit PS2_Data at PINC.B0;
sbit PS2_In_Clock at PINC.B1;
sbit PS2_Out_Clock at PORTC.B1;
sbit PS2_Data_Direction at DDRC.B0;
sbit PS2_Clock_Direction at DDRC.B1;
...
Ps2_Config(); // Init PS/2 Keyboard