Data Sheet
Proteus VSM
189
The last step is to write a function that does something when we enter our mode of operation.
We'll add this at the bottom of the file.
You can experiment and add anything you like here but we'll do something simple, writing a
value to the display and adding a little binary counter on the LED's.
Since we are using PORTE to write the LED's here we also need to configure the port pins.
We'll set up ANSELE in the peripheral config section at the top of the main function.
The final step is to build the project and launch Proteus as discussed before. If you have made
a mistake (as we have here) you will get a compiler error in the output window. Clicking on this