

- #HOW TO BURN CHIP WITH BINARY EDITOR SOFTWARE#
- #HOW TO BURN CHIP WITH BINARY EDITOR CODE#
- #HOW TO BURN CHIP WITH BINARY EDITOR SERIES#
If you are dealing with PIC programming and are working with a PIC assembler then hex numbers that begin with a letter should be preceded by 0x. To show that we are talking in hex values we put in a little (h) after the number like this. This pattern continues until we reach 99 and then we place another digit in, and so on. We then have to add an extra digit to the number to equal ten. In this system, we add 1 to each number until we reach 9. We were taught to count in a base 10 or decimal number system because we have 10 fingers on our hands. Similarly, the PIC would see a Logic 0 on this pin if 0 volts were connected. If a pin is configured as an input and 5 volts is connected to this pin, then the PIC would see a Logic 1. If the pin is output low then it is Logic 0 or 0 volts.

If a pin is output high then it is Logic 1 or 5 volts. It is exactly as we mentioned before when we were talking about the output port pins of the PIC. In computer terms these are called Logic States. A computer is made up of millions of switches that can either be on or off. Number SystemsĪny computer system, whether it be a PIC, a PC, or a gigantic main frame computer, can only understand these 2 things. At some stage you will need to use them in your programs as well as decimal and binary numbers.

Hex numbers may be new to you so it will be best to have a quick look at them now. It’s not very meaningful to us is it, but that does not matter because we are not computers.

#HOW TO BURN CHIP WITH BINARY EDITOR CODE#
Over the page is the actual flash.hex code that was programmed into the PIC to make it flash the LED connected to pin RB2.
#HOW TO BURN CHIP WITH BINARY EDITOR SOFTWARE#
The PIC doesn’t care what method you use to write the software because it only understands raw hex code which is placed into the chip by using an appropriate programmer. There are other ways like using a BASIC or C complier. You can write it with a simple text editor like NotePad, or use MPLAB from Microchip. There are quite a few ways to create software for the PIC. Now that we have our LED circuit figured out, the next stage is to write the software that will flash it for us.Īs you can now see, there’s not much point writing any software without knowing what the hardware will be. The cathode pin will have a flat surface moulded next to it into the red plastic, and the anode pin is longer than the cathode pin. You can easily tell the cathode from the anode. As you may already know, a LED can only work if the anode is more positive than the cathode, so the cathode side of the LED will be connected to RB2 which will drive that end of the LED low.
#HOW TO BURN CHIP WITH BINARY EDITOR SERIES#
To summarise our project so far, we are going to flash a red LED in series with a 1K ohm resistor from PORTB pin RB2. Lets use pin RB2 to drive the LED in our first test program. You will remember most of these tricks after you become familiar with a particular chip, but even the most experienced programmers can get caught with these problems sometimes. There are a few hidden gotcha’s that exist in the world of microcontrollers and the best way of knowing about them is by close examination of the device data sheets. This means the IO pins have to go low to light the In this project that fact doesn’t matter because all the LED anodes are connected to the 5V rail through a 1K resistor. It would need to be connected between this pin and the 5 volt supply.
