Online Programming Kit for 8051 Microcontroller: Design and Implementation, Thesis of Microcontrollers

The development of an online programming capable card for the 8051 microcontroller. The project involves designing and building a pcb, as well as writing software for both the pc and microcontroller. The microcontroller uses a shared memory to store user programs, which are transferred from the pc through a serial port. The document also covers the use of altium software for creating the pcb and provides a hardware list and cautions for the project.

Typology: Thesis

2011/2012

Uploaded on 07/03/2012

booby
booby 🇮🇳

3.8

(15)

21 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Online Programming Capable Card for 8051
Introduction:
Online programming capable card is a kit developed to reprogramme a microcontroller
without taking it out of the circuit. The programme is loaded from PC through serial port
and is stored in the RAM. After complete transfer of the programme to the RAM , the
control is transferred to that location from where the programme starts.
We divided our work in two parts.
1 hardware portion i-e building PCB.
2 software portion - writing programme for both ends ( PC and microcontroller )
Discription of project
8051 micro controller has 16 address lines. Hence we can access 64k of internal or
external memory.
We will have to use the external memory, because we are giving flexibility to user so that
he can store large programmes. We divided this array of memory into four parts.
1. ROM (8k) for handshaking with PC.
2. Shared memory (32k) , act as code and data memory.
3. Data memory (16k)
4. I/O devices (8k)
Memory space from 0000h to 1FFFh is assigned to the ROM. Our handshaking
programme is stored in this ROM. A protocol is developed to communicate with PC. It
will receive the .hex file from PC and will store it in shared memory. After completing
the transfer of programme to shared memory, this ROM will hand over command to the
shared memory.
Shared memory is the memory space where the user programme is stored to be run. It is
assigned 32k memory from 2000h to 9FFFh. After the ROM has stored the programme in
shared memory, it gives command to shared memory by just executing the folliwing
command,
Ljmp 2000h;
The user programme might use some memory array for storing data. For this purpose we
have reserved 16k of RAM from address A000h to DFFFh.
The final 8k from E000h to FFFFh is reserver for external peripheries. Port extenders can
be used to increase its capacity also.
Docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Online Programming Kit for 8051 Microcontroller: Design and Implementation and more Thesis Microcontrollers in PDF only on Docsity!

Online Programming Capable Card for 8051

Introduction :

Online programming capable card is a kit developed to reprogramme a microcontroller without taking it out of the circuit. The programme is loaded from PC through serial port and is stored in the RAM. After complete transfer of the programme to the RAM , the control is transferred to that location from where the programme starts. We divided our work in two parts.

1 – hardware portion i-e building PCB. 2 – software portion - writing programme for both ends ( PC and microcontroller )

Discription of project

8051 micro controller has 16 address lines. Hence we can access 64k of internal or external memory. We will have to use the external memory, because we are giving flexibility to user so that he can store large programmes. We divided this array of memory into four parts.

  1. ROM (8k) for handshaking with PC.
  2. Shared memory (32k) , act as code and data memory.
  3. Data memory (16k)
  4. I/O devices (8k) Memory space from 0000h to 1FFFh is assigned to the ROM. Our handshaking programme is stored in this ROM. A protocol is developed to communicate with PC. It will receive the .hex file from PC and will store it in shared memory. After completing the transfer of programme to shared memory, this ROM will hand over command to the shared memory. Shared memory is the memory space where the user programme is stored to be run. It is assigned 32k memory from 2000h to 9FFFh. After the ROM has stored the programme in shared memory, it gives command to shared memory by just executing the folliwing command,

Ljmp 2000h;

The user programme might use some memory array for storing data. For this purpose we have reserved 16k of RAM from address A000h to DFFFh. The final 8k from E000h to FFFFh is reserver for external peripheries. Port extenders can be used to increase its capacity also.

Making/Creating the Printed Circuit Board :

Making PCBs for circuits can help you to reduce the time you spend building circuits, especially if you are producing multiple units, as you only need to follow a parts placement diagram (there's no longer any need to worry about specific interconnections). After you've prototyped and tested your circuit design, creating a PCB will provide a sturdy and reliable backbone for your circuit and will give your project a professional finished quality.

You can choose any software for making PCB. Such as Proteus Altium etc.We decided to use ALTIUM. Making schematic first helps because ALTIUM will show you clearly if you make any mistakes with the PCB draw schematic in Altium and it will auto route it for you. Keep clearance between wires not less than 1mm and wire width not less than .5mm. restrict the software to make connections with pads only from bottom side, because soldering on the top side with pads is so much time consuming. After auto routing make some manual changes in the auto routed PCB layout to minimize vias and wires in the circuit. It might seem useless but it can help you considerably reducing the effort which will you make after wards. Never forget to make reference points on the PCB layout. Mirror the top side in print lay out. Print it out onto some sticker sheet. Then quickly take this paper, cut out your design and place it face down onto some blank PCB board. Then use an iron and press the design on to the board. Ensure all parts of the design make good contact with the blank PCB. Keep it pressed for at least 15 minutes. Repeat this process for the other side also. Make sure exact alignment of both the sides. So that all pads and vias coincide precisely. Then remove paper from both sides. Be sure not to remove any of the black ink traces because these are what stop the acid in the etching process. Now drill out the holes as on your requirement. Now the PCB is ready for etching. Get some etchant (acid, ferric chloride) and just follow the instructions for the dilution level. Add boiling water from a jug. And slowly swirl or rock the bowl around. The liquid must be always moving over the copper board to get it to etch properly. Now give it a rinse in cold water and scrub the black ink off the PCB with a scratchy dish cleaner thing or steel wool. Then all you need is to start mounting the components.

Protocol

Micro controller will scan its serial port for arriving data. After receiving the start byte it will send an ACK byte. After this has been done it will store the received data in shared memory till the end of file EOF byte. After receiving this EOF , the command will be transferred to the shared memory and the user progamme will be executed. The flow chart diagram is given below.

Hardware required

The following hardware components are required.

  1. 89c
  2. MAX 232
  3. 74LS138 (latch).
  4. 74LS373 ( decoder)
  5. 74LS08 (quad AND)
  6. MBM 2764 (8k ROM)
  7. 62256 (32k RAM)
  8. 6264 (8k RAM)
  9. 20*2 H connector
  10. Bypass capacitors

Discription of each component can be seen from data sheets. The bypass capacitors are used to cope with the noise randomly produced in the board. Clean rusted pins of ICs if any, because the sometimes cause disconnection of pins.

Cautions

  1. Your path width should not be less than .5mm and clearance between paths shoud not be less than 1mm.
  2. Check each and every via after soldering.
  3. Check connections to bases after you have placed them on board.
  4. Take connections on bottom layer from pads.

Mistakes

  1. One thing which annoyed us much is that we didn’t care to take connections from the pads on bottom side. Afterwards we had to make further holes to give them connections with bottom layer. Hope no one will make such mistake again. Concern your design with your supervisor at each step.
  2. We forgot to take out the connections from microcontroller pins. These might be used for any task by users. Not taking out these connections might restrict the programmer to certain limits. One must not forget to take out these connections.
  3. We could not manage to divide our work effectively. Task division among project members should be clear cut and at the beginning.

Send ACK transfer hold to RAM

END

  1. After we had made the PCB we tested our PCB for serial communication. Again problem was waiting for us. It failed to communicate with PC. It might be the problem of the external ROM. So you must put the flexibility to run from external or internal memory. I mean to say that now we are going to add a DTSP(double through single pole) three terminal switch to make EA (external enable) pin high our low whenever we want. This is only one among many examples to mention.