Monday, June 20, 2011

programming the Microchip PIC ATMEL




The advances in computer technology have brought with them a strong evolution of the electronic components can be found today for a few euros integrated circuit comprising a CPU, RAM and ROM, whose power equals that of the first computers the years 1980 to 1990.


The most popular microcontrollers today are undoubtedly the Microchip PIC. But originally, the area was disputed, as the CPU computers, the two giants MOTOROLA (with the 68HC11 and 6809) and Intel (with 8051 in particular).

It is the latter that interests me, although out of fashion, the 8051 has imposed its language and its architecture, so that today there are modern chips (with integrated flash and ram) are compatible with its language. This is the case and AT89C1051 microcontrollers from ATMEL 2051.

This will please the old who wish to recover a few circuits to be programmed without having to relearn a new language.

On this page I will propose to make a programmer for Atmel AT89C1051 and AT89C2051. You will also find a free download documentation and all necessary tools to create your programs, simulate and program the chips.


1. The diagram

The scheme used has been closely following the directions given by the author of the programming software. I would be rather short on its operation.

Here's the diagram:







Food is very classic, it uses a 7805 regulator.

Transistors and zener diodes are used to generate the required voltage levels on pin RST for programming or reading of the chip. Without control voltage of T2 and T3, T1 sends a voltage of 12V on RST. If T2 is controlled, the voltage drops to 5V, if T3 is controlled, it falls to 0V.

The parallel port not having enough pins, programming is done in series.

The CD4021 is a multiplexer circuit, it is used to read the byte presented by Atmel on its port P1. Here is the pinout and the truth table of CD4021:







You can download the datasheet of the CD4021 in here (72 KB).

The CD4094 is a demultiplexer circuit and serves to introduce at once a byte on the Atmel for writing byte has been transmitted bit by bit via the parallel port. Here is the pinout and the truth table of CD4094:







You can download the datasheet of the CD4094 in here (69 KB).

In the diagram the numbers in parentheses correspond to the numbers of connector pins Centronix female. The use of this connector allows you to use a printer cable to connect this assembly to the parallel port of a computer.


2. The list of components

IC1: tulip Support for Atmel 20-pin DIL
IC2: CD4021
IC3: CD4094
REG1: Regulator TO220 case in 7805
T1 = T2 = T3: BC547B
D1: Diode 12V 1/4W zener
D2: 1N4148 Diode
D3: Zener Diode 1/4W 5V6
D4 = D6: red LED low power consumption
D5: Zener Diode 1/4W 3V3
B1: 30V 500mA diode bridge minimum
C1 = C2 = C4 = C5: ceramic capacitor 100NF 250V
C5: Capacitor 35V chemical 470μf
R1 = R13: 100 Ohms 1/4W
R2: 680 ohm 1/4W
R3 = R4 = R5: 3.3 KOhms 1/4W
R6 = R7 = R8 = R9 = R10 = R11: 1 KOhms 1/4W
R12 = R14: 2.2 KOhms 1/4W
+ A switch
+ A 36 pin female connector Centronix to printer port

3. The offset films

Here's the artwork:







Note: You will find that the offset films and settlement patterns are not reversed, so you need to put the non-printed artwork face against the window of sunshine (if it is not clear in your mind, I should consult the section on exposure of the page on the manufacture of ICs ).

Click here to download the artwork (8 kb) for the software Quickroute lite 3.6, available in diskettes and CD-rom accompanying the journal Practical Electronics.

Click here to download the artwork (85 kb) as high-resolution image.

Click here to download the software Quickroute lite 3.6 (871 kb)

Get all components before making your circuit, you may need to change the artwork depending on the size of your components.

I recommend you place the CD4021 and CD4094 integrated circuits on substrates.


4. The implementation of components

Here is the board layout:







Be careful there are many straps (20). A round mark the direction in which to place the integrated circuit and the support from Atmel. The capacitor C2 is housed under the support of Atmel, or copper side if its size does not allow it, it is necessary to protect against interference Atmel.


5. Some pictures

I set my timer and transformer in a small cabinet-plated against:







A plug to avoid having to solder and wrap a cord 220.

I placed the plate and performed a notch in the box so that we can easily extract the Atmel from its support by lifting each side with a screwdriver:














6. Download and install software


Click here to download the software (79 kb) to use your programmer (D. Laues - Segment C). After unzipping the archive read the file README.TXT.

If the computer is used on Windows XP, you will need Porttalk order to operate the software programmer. Click here to download Porttalk (20 KB) (Craig Peacock). After unzipping the archive read the file README.TXT.

Click here to download the software (702 KB) to compile your programs to Atmel. (KEIL ELEKTRONIK)

Click here to download the software (103 KB) to simulate your programs for Atmel (Adam Dybkowski).

Finally, click here to download the guide from the instruction set of the Atmel (140 kb), which is unsurprisingly very similar to that of 8051.


7. Using the Scheduler

Here is the procedure to be followed to use the program:
  • Launch the software to put the output port in fair condition
  • Exit the software
  • Insert the chip to be programmed or read in the programmer
  • Connect the programmer to port
  • Connect the programmer to 220V
  • Turn on the programmer
  • Run the software
  • If an error is reported to change the port in the config menu
  • Use the software to play or burn files BIN
  • Note: If the BIN file is not completed in 1 or 2K bytes to 255 with a (false) error is reported
  • Exit the software
  • Turn off the timer
  • Disconnect the port and 220V
  • Remove the chip programmer

No comments:

Post a Comment

Thematic Links :