Based on the GPIO learning of F28069, F280049 is basically the same
Schematic diagram of the experimental board I built myself
F280049 has two MUXs, and the others are similar.
Regarding the input part, C2000 has a special feature of de-jitter unit or de-burr, interrupt and some other inputs are not known yet
Then when I was doing the output of the running light experiment, the GPADAT register was used to write the status to be output, and it could also read the status. I wrote the following sentence to do the experiment
if(GpioDataRegs.GPADAT.bit.GPIO24 == 0)
bsp_LedCtrl(LEDR,Toggle);//LEDR is LED4 on the board,
io 24 is the output port. The state of this port is used to control another port. Experiments have shown that this is possible. Combined with the block diagram, the input is not controlled on and off, and the state can always be
Then I wrote a key input program, the principle is actually the same as the above one
if(GpioDataRegs.GPADAT.bit.GPIO14 == 0)
bsp_LedCtrl(LEDG,Toggle);
It is very simple and direct to control, but it is easy to lose some key events. The ideal state should be to use a timer to scan at a fixed frequency and output a fixed
Key events, or through key interrupts. Interrupts to scan the keyboard probably won't work. . .
All through the timer.
|