Motorola 68HC12 User Manual page 29

Table of Contents

Advertisement

void _ _main(void)
{
DB12->SetUserVector(PortJKey, KeyJ); // assign the vector address
_H12KPOLJ=0x00;
_H12KWIFJ=0xFF;
_H12PUPSJ=0xFF;
_H12PULEJ=0xFF;
_H12KWIEJ=0xFF;
while(1)
{
}
}
_ _mod2_ _ void KeyJ(void)
{
_H12KWIFJ=_H12KWIFJ;
}
// falling edge sets flag
// clear any flags that may be set
// pull up
// pull up enabled all bits
// Enable all bits of J for keypad
// Infinite loop
// function prototype
// clear the flag
29

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents