How to edit source code?
To edit source code, C or Assembly editor is opened from the code editor window. The 8051 code editor window can be viewed by clicking Setup button in the
Component Parameter Setup dialog.
After making any modifications in the code, compilation can be done.
Code modification example with reference to 8051_Counter
Inorder to count only up to 20 instead of 255, the source code inside 8051 has to be edited as shown:
Let the counter variable i is set to count from ‘a’ to 20, where 20 is the final required count.
.e. Instead of
for (i = a; i < 255;i++)
the code has to be modified as
for (i = a; i < 20;i++)