MPLAB SIM is a powerful tool for testing code on your PC without any other tools. Code can be tested using the debug features to validate that variables are handled correctly. There is a Stopwatch and Trace Analyzer allow measurement of code sections for optimization and analysis. And the Stimulus features can be used to simulate real-world signals.
A use case for this simulator is for code optimization, problem diagnostics and chip emulation where you do not need to have the simulation of the external/additional hardware devices.
The widest range of supported devices.
Example Usage
A typical GCB use could be to understand the state of the compiled GCB to determine the root cause of an issue. You can load the GCB ASM code into tool, compile and then walk through the code step by step or run the code tool a stop point where the problem may be occurring.
This simulator is essentially a debugger to enable you to develop code , then when your hardware is ready, you can use a hardware debugger to further test your code in practice without having to learn how to use a debugging tool.
The basic functions are:
- Reset the chip, in order to restart the application
- Execute the code so the program can be tested to verify it functions as designed
- Halt the code at breakpoints
- While halted at breakpoints, memory and variables can be examined
and modified to analyze and debug the application code
- To closely inspect how code executes, each instruction can be Single
stepped. You can go through code one instruction at a time while monitoring affected variables, registers and flags.
- Watch points group and monitor selected variables and memory locations.
- Trace buffers capture the streams of instructions executed and show the contents of changing register values.
- A Stopwatch can time a section of code. Critical code timing can be accurately measured.
- Complex breakpoints can be defined to create breakpoints or for gathering data in the trace buffer based upon multiple conditions. Simple breakpoints allow setting breakpoints in the source code or anywhere in program memory.
To run a simulation create a new project in the project wizard, set the Chip, select the default toolset 'Microchip MPASM toolsuite', name you project (within your folder structure), add you GCB created ASM file and then execute the 'build all' command. Again, ensure you select 'Ignore case sensitivity' in the Build Option/MASM Assembler tab - if you get an error during the build process this may be the cause of the issues.
Installation
Follow the instructions as shown on this [page]www.microchip.com/pagehandler/en-us/family/mplabx/) the only difference you have to make is to ensure you select 'Ignore case sensitivity' in the Build Option/MASM Assembler tab.
Last edit: Anobium 2014-01-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
PICsimLab emulates a microcontroller PIC16F628/16F877A/18F452 and periferics such as USART and timers, the simulator architecture permist easy implementation of external elements in c language. PicsimLab is a realtime emulator of development boards.
Features
Realtime emulation
Picstart and programmer emulation
Use Case
Example Usage
Installation
Last edit: Anobium 2014-01-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What is Real Pic Simulator?
Some of the information in the posting is from the simulators help file and therefore is copyright Digital Electro Soft.
Real Pic Simulator is the fastest software microcontroller simulator targeting the Microchip(tm) baseline and mid-range flash based PIC microcontrollers. It is a software that decreases substantially the developing and the testing time for PIC microcontroller software.
Features
Integrated disassembler - allows to export the code to assembler code.
Debugger - allows execution of the program in real-time, at selected speed or step-by-step, including breakpoints.
RAM and EEPROM viewer - allows the user to inspect RAM and EEPROM memory
Processor viewer - view the microcontroller's pin allocation and characteristics.
Visual simulator - allows a visual simulation of the program with the visual components (LEDs,Keypads etc.)
For devices and modules as shown above. It is essential to ensure your device(chip) is supported and the hardware configuration matching your projects.
Example Usage
The simulator is excellent for testing within the scope of the supported devices and modules. Usage is very simple.
Start the application, select your chip, create your hardware config using the modules supported and then load your GCB hex file and then start the emulator. You can review memory, step through the code, examine a host of parameters and review state of the chip.
Installation
Follow the link above and for download instructions and licensing. Essentially, install following the simple instructions.
Last edit: Anobium 2014-01-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This FAQ will provide insights into using software emulators with Great Cow Basic. This will be updated as appropriate.
The FAQ covers the following:
This FAQ will have sub posting for each simulator.
If you know of another simulator or you have insights you can share please post. Sharing will increase our knowledge.
Anobium
Last edit: Anobium 2014-01-27
MPLAB IDE
Background and Key Links
MPLAB SIM is a powerful tool for testing code on your PC without any other tools. Code can be tested using the debug features to validate that variables are handled correctly. There is a Stopwatch and Trace Analyzer allow measurement of code sections for optimization and analysis. And the Stimulus features can be used to simulate real-world signals.
This simulator is included with MPLAB IDE tooset.
See here for a deep dive into this simulator.
Use Case
A use case for this simulator is for code optimization, problem diagnostics and chip emulation where you do not need to have the simulation of the external/additional hardware devices.
The widest range of supported devices.
Example Usage
A typical GCB use could be to understand the state of the compiled GCB to determine the root cause of an issue. You can load the GCB ASM code into tool, compile and then walk through the code step by step or run the code tool a stop point where the problem may be occurring.
This simulator is essentially a debugger to enable you to develop code , then when your hardware is ready, you can use a hardware debugger to further test your code in practice without having to learn how to use a debugging tool.
The basic functions are:
- Reset the chip, in order to restart the application
- Execute the code so the program can be tested to verify it functions as designed
- Halt the code at breakpoints
- While halted at breakpoints, memory and variables can be examined
and modified to analyze and debug the application code
- To closely inspect how code executes, each instruction can be Single
stepped. You can go through code one instruction at a time while monitoring affected variables, registers and flags.
- Watch points group and monitor selected variables and memory locations.
- Trace buffers capture the streams of instructions executed and show the contents of changing register values.
- A Stopwatch can time a section of code. Critical code timing can be accurately measured.
- Complex breakpoints can be defined to create breakpoints or for gathering data in the trace buffer based upon multiple conditions. Simple breakpoints allow setting breakpoints in the source code or anywhere in program memory.
To run a simulation create a new project in the project wizard, set the Chip, select the default toolset 'Microchip MPASM toolsuite', name you project (within your folder structure), add you GCB created ASM file and then execute the 'build all' command. Again, ensure you select 'Ignore case sensitivity' in the Build Option/MASM Assembler tab - if you get an error during the build process this may be the cause of the issues.
Installation
Follow the instructions as shown on this [page]www.microchip.com/pagehandler/en-us/family/mplabx/) the only difference you have to make is to ensure you select 'Ignore case sensitivity' in the Build Option/MASM Assembler tab.
Last edit: Anobium 2014-01-29
Real Pic Simulator
[To be completed]
Background and Key Links
Use Case
Example Usage
Installation
Last edit: Anobium 2014-01-27
PicSimLab
[Draft, to be completed]
Background and Key Links
PICsimLab emulates a microcontroller PIC16F628/16F877A/18F452 and periferics such as USART and timers, the simulator architecture permist easy implementation of external elements in c language. PicsimLab is a realtime emulator of development boards.
Features
Realtime emulation
Picstart and programmer emulation
Use Case
Example Usage
Installation
Last edit: Anobium 2014-01-27
Pic Simulator
Background and Key Links
What is Real Pic Simulator?
Some of the information in the posting is from the simulators help file and therefore is copyright Digital Electro Soft.
Real Pic Simulator is the fastest software microcontroller simulator targeting the Microchip(tm) baseline and mid-range flash based PIC microcontrollers. It is a software that decreases substantially the developing and the testing time for PIC microcontroller software.
Features
Integrated disassembler - allows to export the code to assembler code.
Debugger - allows execution of the program in real-time, at selected speed or step-by-step, including breakpoints.
RAM and EEPROM viewer - allows the user to inspect RAM and EEPROM memory
Processor viewer - view the microcontroller's pin allocation and characteristics.
Visual simulator - allows a visual simulation of the program with the visual components (LEDs,Keypads etc.)
Supported PIC microcontrollers
Baseline:
10F200 10F202 10F204 10F206 10F220 10F222 12F508 12F509
12F510 12F519 16F505 16F506 16F526 16F54 16F57 16F59
Total:16
Mid-range:
12F609 12F615 12F629 12F635 12F675 12F683 16F610 16F616 16F627 16F627A
16F628 16F628A 16F630 16F631 16F636 16F639 16F648A 16F676 16F677 16F684
16F685 16F687 16F688 16F689 16F690 16F716 16F72 16F722 16F723 16F724
16F726 16F727 16F73 16F737 16F74 16F747 16F76 16F767 16F77 16F777
16F785 16F818 16F819 16F83 16F84 16F84A 16F87 16F870 16F871 16F872
16F873 16F873A 16F874 16F874A 16F876 16F876A 16F877 16F877A 16F88 16F882
16F883 16F884 16F886 16F887 16F913 16F914 16F916 16F917 16F946
Total:69
Simulated modules
Timer0
Timer1
Timer2
EEPROM read/write and FLASH read
Interrupt-on-change
External interrupt on INT pin
CCP module
ADC module
UART module
~~~~
The key link is here
Use Case
For devices and modules as shown above. It is essential to ensure your device(chip) is supported and the hardware configuration matching your projects.
Example Usage
The simulator is excellent for testing within the scope of the supported devices and modules. Usage is very simple.
Start the application, select your chip, create your hardware config using the modules supported and then load your GCB hex file and then start the emulator. You can review memory, step through the code, examine a host of parameters and review state of the chip.
Installation
Follow the link above and for download instructions and licensing. Essentially, install following the simple instructions.
Last edit: Anobium 2014-01-27
Hi,
Recently, I found this video on YouTube showing GCBasic code simulation on SimulIDE.
https://www.youtube.com/watch?v=Mit1rnrrk6g
SimulIDE homepage link is
https://simulide.com/p/
SimulIDE YouTube channel link is
https://www.youtube.com/@simulide6736
Regards,
Awais
Last edit: Awais 2024-01-09