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