8051 Programming question/clarification

Discussion in 'Embedded Systems and Microcontrollers' started by Unteddybear, Nov 18, 2011.

  1. Unteddybear

    Thread Starter New Member

    Nov 18, 2011

    I have a couple of questions about programming a microcontroller through the serial port. I am wanting to know if the particular uC is what allows me to program it without a commercial programmer, or if the 8051 type of uC is what allows this, or if any uC can be programmed from a circuit using NOR gates and a transceiver. Here are the components I am referencing to:

    Phillips P89LPC925 8051 uC
    Phillips 74HCT02N Quad 2-input NOR gate
    Linear Tech LTC1385CN 3.3v Low Power EIA/TIA-562 Tranceiver

    I have attached the photo of the schematic that was/is going to be used(old project from college) There is one correction on this on pin 1 of the transceiver, you can see the scribble out of a deleted connection and a drawn in connection to pin 21 of the uC. Is this an ICP? Page 86 of 105 in the uC datasheet references this, but yields no schematic to make it work.

    Here is the <a href=http://www.keil.com/dd/chip/3704.htm> link </a> to the webpage years ago. The schematic in the picture I think might be the MCB900 board; I am not sure but its with the project/datasheets that we followed. We used Flash Magic to compile and Keil to transmit if I remember correctly. I found another diagram while trying to google this question <a href=http://www.flashmagictool.com/assets/resources/LPC_PGM2_public.pdf>here</a>.

    Please let me know if you need any more information. The sad part is that my computer no longer has a serial port in the back. Would it be possibly to easily modify this to USB interface?

    Thank you,

    PS. This is a fairly easy to make programmer. Do all/most uC have a way to program them like this?(easy, no costly programmer).

    edit: apparently I have forgotten how to post links :(
    Last edited: Nov 18, 2011
  2. jimkeith

    Well-Known Member

    Oct 26, 2011
    I cannot speak with experience on the exact on you are using, but Sunrom has excellent in-circuit programmers--I have had good results with them--the one I used had a serial input, but now they are USB
    Viral, the owner, will answer questions via email
    Their data sheet indicates that it supports the 89LCP25 device
    It also comes with a pc utility that makes it very easy to download the hex file
    Last edited: Nov 18, 2011
  3. MrChips


    Oct 2, 2009
    Each microprocessor manufacturer chooses a particular method for programming their devices. Some systems need only a single wire (plus power and ground). Some use the TX/RX two wire serial port (SCI or UART) while others use the SPI port. Another common connection for in-system-propramming and debugging is called JTAG.

    The 8051 you refer to uses the TX/RX serial port. All that is needed is a TTL-to-RS232 level shifter. There is no need for the NOR gate.

    If your PC no longer has a serial port, you can purchase a RS232-to-USB adapter cable. Because of timing issues, not all such adapters work for every application.
  4. Unteddybear

    Thread Starter New Member

    Nov 18, 2011
    I have gone over my circiut diagram and have everything setup. The micro still has the "hello world blinking LED" from the last time I was messing around with this project(6years ago). My dilemma is that I have an old laptop(233Mhz, 64MB ram Win98), it is the only thing that I have a serial port on. I was able to load flash magic onto this. I am now unable to communicate with the uC.

    I have tried blank check and Read device signature. I have for step 1 the Device as 89LPC925, Baud rate 7200, Interface: None(ISP) and Oscillator(MHz): 7.373(internal ocsillator). I have taken the RUN jumper wire out and put it on the reset jumper for programming and have not gotten any results. I even tried the orignal connection of EN(pin1 shown scribbled out and connects to the transitor collector(this was errata from school)

    Can anyone help me get this communicating? Or offer how I can troubleshoot? I have a LED that I can see the reset pin and Vdd getting signal while trying to comm, but only a quick flicker on the Tx pin.

    btw: micro in the diagram is a 89LPC932 but I have the same setup for the LPC925(minus ext oscillator): Vdd, Vss, RST, Tx(P1.0), and Rx(P1.1). This circuit worked for the class and the tinkering afterwards, just not nowadays for communicating uploading new code. Also, yay for my dad keeping the ancient lappy, it has a purpose yet again lol.

    Thank you :)
    Last edited: Nov 28, 2011