21
21
21
21
Insert following code into main function located in main module:
void main(void)
{
/* enable PC keyboard in FPGA */
*(__far byte *)0xEBUL|=0x10;
/* enable ExtInt bean */
Button_Enable();
/* loop */
for(;;);
}
Then double-click on the
Beans | Button:ExtInt | OnInterrupt
item in
the project panel tree and the event's handling routine will be selected in
the editor. Drag&drop methods
NegVal
from beans GreenLED and
RedLED into
ButtonOnInterrupt
event routine using mouse:
void ButtonOnInterrupt(void)
{
RedLED_NegVal();
GreenLED_NegVal();
}
•
Compile.
Select command
main menu | Tools | Make
or press
F9
to
run internal make. Make uses Softune command line tools to compile
and link generated and user code.
Note:
Processor Expert requires to save all files in internal editor. You
can do this unis command
editor local menu | File | Save
or press
Ctrl+S
. If you check option
main menu | Options | Environemnt
Options | Autosave file before running codesign or external tool
Processor Expert saves all files automatically.
•
Debug
.
Check the settings of jumpers on the DevKit16, connect your PC
with your DevKit16 board using serial cable, connect power supply to
DevKi16 and select command
main menu | Debug | Start Debug
. If you
find any problem with initialization of the debugger please refer to debugger
documentation: open
Cpu Inspector - page Debugger
and press
F1
.
Note:
You can check option:
main menu | Options | Environment Options |
Successful make or build automatically start PE Debug
to
start debugger
automatically after make or build.