Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] How do I test an assembly language program? Software required?

Status
Not open for further replies.

coder123

Newbie level 4
Joined
Jun 11, 2015
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
42
How do i test an assembly language program ? Softwares required ?

Hello I am new with PIC 16f676 .
How do i test a simple program and run it using PIC16f676. Which software do i need to install and test it ? Also how do i compile and run it ?

Thank you
 

Re: How do i test an assembly language program ? Softwares required ?

If you want to write code in asm then you need to install MPLAB or MPLAB X and MPASM. If you want to code in C then you can install free version of XC8 Compiler. For XC8 you need MPLAB X. It won't work with MPLAB. If you want to do C coding with MPLAB or MPLAB X then you can install C18, Hi-Tech PICC Compilers. Also you can try mikroElektronika's mikroC PRO PIC Compiler. In the demo version of MikroC PRO PIC you can write code upto 2 KB. You can also do inline assembly coding in all the Compilers mentioned.

You can use Proteus or Oshonsoft Simulators to test the working of the PIC project if you don't have the hardware. Testing in hardware will be better.
 

Re: How do i test an assembly language program ? Softwares required ?

In MPLAB you can test the program if you select Debuger->MPLAB SIM.
The simulator MPLAB SIM, allow you to run program with breakpoints,step-by-step,timing code,watching variables etc.

If you want to use C in stead of assembly, I strongly recomend to use PIC18F microcontrollers in stead of PIC16.
If you insist on PIC16, use SDCC or HitechC.
If you use PIC18F, use MCC18 or XC8.
I do not recommend MikroC...
 

Re: How do i test an assembly language program ? Softwares required ?

Once you have your program written and debugged, you will need a PIC programmer, such as a pickit3, to load the .hex file into the Pic so you can run it. MPlab supports several programmers. A free program called picpgm supports even more types of programmers.
There are bootloader programs that can be loaded onto the Pic, using a programmer, such as tinybld198, They will allow .hex files of programs to be loaded into the Pic using the Pic's serial interface, without using a programmer.
 

Re: How do i test an assembly language program ? Softwares required ?

... XC8 works fine in MPLAB. It's a stand alone compiler, the IDE you use (if any) isn't important.

The OP wants to debug assembly language code. The best tool by far is MPLAB/MPLABX in which you can import your assembly instructions or a ready built .hex file and use the simulator to trace and monitor your program, register contents and variables.

An alternative is to use Oshonsoft's "PIC Simulator IDE" (note: despite it's name, do not use "PIC16F Simulator IDE") and load the hex file before running simulation. Oshonsoft's program is more visual than MPLAB/MPLABX but is very, very slow in comparison!

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top