Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

This is how the PIC programming process goes

Status
Not open for further replies.

williB

New Member
Some of you may be wondering how the process of PIC Programming goes ..

Basically you write the program ..
Then run MPASM .
Then use your programmer to put the program into the PIC.. easy..

The program is an assembler program or PIC Assembly language program. This tells the PIC what to do and when to do it..
MPASM is free from microchip. MPASM converts the assembly program into a hex file , which the programmer reads and loads into the PIC..
The programmer costs anywhere from 0 to maybe $100 for the higher end ones..maybe a little more..
There are plenty of programmer circuits on the net , and on this board..
Most home made programmers can be had for a few dollars in parts and a few more for the circuit board..
The point is when everything is working fine , it is really fun to see what you can come up with..
with a PIC you can
Blink LEDs
run a motor ...( stepper or dc )
Use PWM to run the DC motor or control the brightness of some LEDs
monitor voltages
plus a lot more
 

GatorGuy

New Member
Thank you, willib. There are a lot of us out there that need a lot of help with subjects like this. If it wasn’t for forums and people like this we would have a hard time learning a new hobby/profession. You wouldn't happen to have any links to tutorials on the assembly language would you? I have been messing with MPLAB and learning what I can but I need to learn assembly now.
 

williB

New Member
learning the basics of assembly language by using the assemblers .lst file is a good way to do it ..
when you assemble a program the assembler outputs several files , one of them is a .LST file
This file lists the hex instruction ,which is going to the target processor , right next to assembly language instruction..
there is not one way to learn assembly , for everyone.
You just have to pour over it , till it clicks..
good luck !!
 

mstechca

New Member
It isn't THAT simple.

Check the data sheet!

You must have a circuit that follows the waveform and the timing in the datasheet, or your program will not be correctly sent to the PIC or any uC.

As for the software, you could follow Will's instructions, but for me, I go 100% direct.

I would like to thank Micro$oft for providing a free version of QuickBasic 1.1 in a package called olddos.exe.

Now take the package, and run QuickBasic.

Your best bet is to use the parallel port because the serial port requires proper timing.

Use the following commands:

open "LPT1:" for output as #1
d$ = chr$(0) + chr$(1)
print #1,d$
close #1
end

the chr$(0) + chr$(1) means that code "0" is sent to the chip first, then code "1". You must change this line to suit your microcontroller.

As soon as the program is run, the correct data is sent to it. No DLL's or windows required ;-).
 

williB

New Member
mstechca said:
It isn't THAT simple.

Check the data sheet!

You must have a circuit that follows the waveform and the timing in the datasheet, or your program will not be correctly sent to the PIC or any uC.
As for the software, you could follow Will's instructions, but for me, I go 100% direct.
I would like to thank Micro$oft for providing a free version of QuickBasic 1.1 in a package called olddos.exe.

Now take the package, and run QuickBasic.

Your best bet is to use the parallel port because the serial port requires proper timing.

Use the following commands:

open "LPT1:" for output as #1
d$ = chr$(0) + chr$(1)
print #1,d$
close #1
end

the chr$(0) + chr$(1) means that code "0" is sent to the chip first, then code "1". You must change this line to suit your microcontroller.

As soon as the program is run, the correct data is sent to it. No DLL's or windows required ;-).
:roll: What ... are you talking about..??
You must have a circuit that follows the waveform and the timing in the datasheet, or your program will not be correctly sent to the PIC or any uC
who said anything different??
As for the software, you could follow Will's instructions, but for me, I go 100% direct.
I am not recommending that anyone follow what i have done with my programmer or the software i wrote to program the PIC..
What i was describing was the process that EVERYONE must go through to get a program into the PIC..
EDIT::
open "LPT1:" for output as #1
d$ = chr$(0) + chr$(1)
print #1,d$
close #1
end

the chr$(0) + chr$(1) means that code "0" is sent to the chip first, then code "1". You must change this line to suit your microcontroller.
interresting find though..
 
Status
Not open for further replies.

Latest threads

Top