Philips enhanced 8051 core microcontroller ISP simple operation steps

Publisher:mmsg3814Latest update time:2015-12-22 Source: eefocusKeywords:Philips  MCU  ISP Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Philips enhanced 8051 core microcontroller ISP simple operation steps
MC1413 is an inverting driver
 
Philips enhanced 8051 core microcontroller ISP simple operation steps
[ISP Circuit Description]
Philips enhanced 8051 core microcontroller ISP simple operation steps
    The figure above shows the typical connection method of the ISP circuit of the P89V51RD2 microcontroller. If the serial interface part (J1 and U1) is removed, it becomes the minimum system circuit of the traditional 8051 microcontroller. The names of some signals are prefixed with lowercase letters n, which means that the low level is valid. In the circuit, pay attention to several key points:
    VCC is the power supply, which must be stable and reliable;
    the nEA pin cannot be left floating, it must be connected to VCC, or connected to VCC through a pull-up resistor;
    the reset circuit is recommended to use the traditional RC reset, and it is best to have an additional reset button for easy operation;
    the watchdog reset circuit cannot be connected, otherwise it will cause a reset during the ISP period, resulting in download failure;
    the frequency of the crystal oscillator is not arbitrary, and it is recommended to use 11.0592MHz or 22.1182MHz;
    Note: Please leave the nPSEN pin floating and do not connect it to GND, which is different from the P89C51RD2.

[Introduction to ISP driver Flash Magic]
    Flash Magic is a driver that supports ISP downloads for many Philips microcontrollers, including support for P89(L)V51RB2, RC2, and RD2. The software can be downloaded for free from the following websites:
    Zhou Ligong Microcontroller: http://www.zlgmcu.com
    Embedded Systems Academy: http://www.esacademy.com
    The installation method of Flash Magic software is very simple and is omitted.

[ISP operation steps]
1. Connect the serial port cable.
    Note that the 2nd pin of the computer DB9 connection is the computer's receiving Rx, the 3rd pin is the computer's sending Tx, and the 5th pin is GND. Usually, serial port cables have two types: "cross" and "non-cross". Be careful to distinguish and do not connect them in reverse. It is recommended to use a computer with a real serial port for operation. If it is a USB virtual serial port, the download may fail.
2. Run Flash Magic softwareStep1
:
    COM Port: Select the serial port actually used, usually COM1;
    Baud Rate: The baud rate cannot be set too high, 9600 or 19200 is recommended;
    Device: Please select the correct model;
    Interface: Select None (ISP).
Step2:
    Please check "Erase blocks used by Hex File".
Step3:
    Load your program file, note that it must be in HEX format.
Step4:
    Please check "Verify after programming";
    if you don't understand the other items, please do not check them.
Step5:
    Please power on the circuit board first, press and hold the reset button, and then click the "Start" button of Flash Magic software. When the dialog box prompting you to reset appears, release the reset button and the ISP download process will begin. If the reset button is not set, you can click "Start" first, and then power on the circuit board.
Philips enhanced 8051 core microcontroller ISP simple operation steps
3. Run the programAfter
    the ISP download is completed, press the reset button once or power on again to start the program.
 [page]
 
P89C51RD2 ISP is conditional

To use the ISP function of this chip, you must pay attention to
the values ​​of the two registers BOOT STATUS and BOOT VECTOR. When the chip is powered on, it will first check the value
of BOOT STAUTS. If it is not 0, it will jump to the address of BOOT VECTOR*100H to start
executing the mask program; if the value of BOOT STATUS is 0, the MCU will check
whether the level of the /PSEN pin is 0. If it is 0, the above steps will also be executed; and to ensure
the correct execution of ISP, it is necessary to ensure that the value of BOOT VECTOR = 0FCH, because
FC00H is the correct entry for the ISP mask program.
If the value of BOOT VECTOR is changed, then ISP burning cannot be performed normally.
You can modify the value with a universal programmer and then download the program using ISP.
About Boot Vector

If it is a brand new chip, its BOOT STATUS should
be 0FFH, and BOOT VECTOR should be 0FCH.
There is no problem with ISP burning of such a chip. FLASH MAGIC or
WINISP software also provides
the function of reading and modifying these two values; the problem is that after the value of BOOT VECTOR is changed to non-
0FCH, you can't enter the ISP program, and
there is no way to read and modify it. You can only find a universal programmer and
change the value of BOOT VECTOR back to 0FCH through the universal programmer
.

Using P89C664 to realize automatic storage of large batches of data on I2C bus

Abstract: Combined with FlashMagic software, the ISP function of Philips P89C664 microcontroller is introduced in detail. At the same time, the automatic saving technology of large batch data of I2C bus is realized by using P89C664 hardware I2C interface to receive data and forward it to the computer, and the source program list and necessary comments are attached. s0100
     Keywords: FlashMagic ISPI2CP89C664
    Introduction
    In actual work, in some cases, it may be necessary to analyze some data sent by I2C interface. If the data is small, it is easier to solve. For example, the data can be directly saved to the RAM of the microcontroller and then displayed through the LED, but if the amount of data is large, this method is very difficult. In this case, it is a better method to save a large amount of data to the computer. This not only solves the problem of storing large amounts of data, but also makes it easy to edit, analyze and print.
    However, there is no I2C interface in the peripheral interface of the computer, so it is necessary to convert the data sent by I2C so that it can be sent to the computer to realize the file storage of data. Considering various factors, it is more convenient to use UART serial port, because serial port technology is simple, widely used, and various application software are also rich.
    This article not only introduces how to realize the forwarding and automatic storage of I2C data, but also introduces the ISP function of P89C664, and gives detailed matching related software, which can completely save an expensive programmer and is very practical. This is very suitable for amateur self-study of single-chip microcomputer technology or building a simple and practical development system at home.
    1 Introduction to P89C664 single-chip microcomputer and ISP, IAP
    P89C664 is an excellent 51 core single-chip microcomputer chip of Philips, with 64KB Flash program memory, 1792B data memory, I2C hardware full working mode interface, 6clocks/12clocks can be 8 interrupt sources/4-level interrupt priority, dual DPTR registers, PCA and IAP, ISP functions, etc. For specific content, please refer to relevant resources. Detailed technical information and various application documents can be downloaded from Philips' website: http://www.semiconductors.philips.com/.
    The following is a brief introduction to the concepts of ISP and IAP.
    ISP (In System Programming) means in-system programming. It allows the MCU to download new programs while it is still on the product circuit board. One of the obvious advantages of this technology is that you do not need to remove the MCU chip from your circuit board and install it on a traditional programmer to write a new program. You can solder the MCU chip with ISP function on the circuit board, which is more reliable and convenient to use. Of course, you have to leave the UART serial port of the MCU and design a simple peripheral circuit; at the same time, it is also equipped with a dedicated ISP software to realize direct download of user programs. This dedicated ISP download software can be downloaded for free on the websites of various companies. The ISP software of P89C664 can be downloaded from the website of Philips. Of course, if you are interested, you can also design a personalized ISP download software yourself, because Philips is open to various ISP programming instructions.
    IAP (In Application Programming ) means in-application programming. That is, the MCU can obtain new codes and reprogram itself. This is an extremely useful technology. For example, you can remotely upgrade your product through the Internet, program-controlled telephone network, etc., just like common anti-virus software can be automatically upgraded. With this technology, you can use the current program-controlled telephone network, the Internet, etc. to achieve remote automatic upgrades of your embedded system without the inconvenience of traditional mailing chips to customers.
    It should be pointed out that the core technology of ISP and IAP is the same, both of which call internal standard programs to erase and reprogram the Flash memory. The difference is that ISP is completed by a default serial loader (BootLoader) solidified in the chip; while IAP is completed by the user in his own program, which makes it possible to remotely upgrade the product, and can even be said to be a milestone in MCU application technology.
    2 Application of ISP Technology
    For Philips MCU, its ISP circuit is very simple, that is, a circuit that communicates with the computer serial port (Note: The circuit will be slightly different depending on the ISP control software), as shown in Figure 1.
    The Embedded Systems Academy abroad provides an ISP software FlashMagic, which can be downloaded from the organization's website at http://www.esacademy.com/. The connection circuit above is also used with this software. This is an excellent software, easy to operate, powerful, and supports almost all devices with ISP from Philips. In addition, Philips also provides ISP software for free, but its ease of use is not as good as FlashMagic. The
    installation process of FlashMagic is similar to that of standard Windows software, so I will not go into details here. After the installation is complete, after starting FlashMagic, the screen shown in Figure 2 will appear.
    Then FlashMagic will try to connect to the ISP chip with the default settings, as shown in Figure 3.
    Please note that the display "Attempting to connect..." in the status bar indicates that FlashMagic is trying to connect to the ISP device. If you have downloaded the program with FlashMagic and have not changed the ISP device, you will be able to connect quickly. If you are using it for the first time, you need to make some necessary targeted settings so that FlashMagic can connect to the MCU with ISP normally. If the connection fails, FlashMagic will pop up the prompt box shown in Figure 4.
    Please click "Cancel"! Then select the menu Options/AdvancedOptions... in the main interface of the software, as shown in Figure 5.
    At this time, a setting box pops up. Please switch to the HardwareConfig tab, as shown in Figure 6. Enable the options
    "UseDTRandRTStocontrolRSTandPSEN " and "KeepRTSassertedwhileCOMPortopen ". No other changes are needed. Just click "OK" to confirm. There are clear 1, 2, 3, 4, and 5 digital indicators on the main interface of FlashMagic. These 1 to 5 numbers do not represent 5 different areas, nor are they 5 steps to download the program. Of course, if you have already set it up, you can directly click the "start" button after each download. In area 1, we need to set each option here. Here we take P89C664 as an example, as shown in Figure 7. COMPort: FlashMagic supports 4 serial ports, COM1, COM2, COM3 and COM4. Most computers only have COM1 and COM2 ports. The main COM port is selected, which is the serial port connected to the user board. BaudRate: Set the download rate of the program here. Choose a suitable value according to the situation. It should not be too large, otherwise it will fail to connect due to interference. Usually, 19200bps is more suitable.
    
    
    
    

More suitable.
    Device: Select the ISP device model. In FlashMagic version 1.81, a total of 35 ISP devices are supported. Here, select P89C664.
    OscillatorFrea.(MHz): Please fill in the crystal frequency value of the MCU on your user board.
    The other parts are similar. You can download the next FlashMagic by yourself. It will be very clear after a new operation.
    In addition to downloading user programs, FlashMagic also provides some other functions, all of which are concentrated in the "ISP" menu. You can try it yourself, and you will find that FlashMagic is really easy to use. With it, your development work will be more efficient, and you can save an expensive programmer, which is especially suitable for microcontroller beginners.
    3I2C receives data and forwards it to the computer
    . Since P89C664 has a hardware I2C interface, we use it as a slave device to receive data on the I2C bus. Philips provides a standard I2C interface control program package in the relevant technical information. In fact, you can also write the I2C interface control program yourself according to the information of P89C664, but the reference program provided by Philips is worth learning and studying. The following program uses the I2C interface control program launched by Philips. In order to be more suitable for receiving large quantities of I2C bus data, we have made necessary changes to some of the codes. If you need a standard control program, please download it from the Philips website.
    The program flow is to first set the address of the I2C interface and the value of each SFR, then start the I2C interface, and send the received data to the computer through the serial port. Start another serial port debugging software on the computer and make relevant settings, and the data of the I2C bus can be received and saved. Here, our user board acts as a protocol conversion device, that is, converting the data stream of the I2C bus into the data stream of the UART and sending it to the computer.
    Please note: Generally, our ISP download and serial port debugging share the same circuit and the same serial port. Therefore, FlashMagic and serial port debugging software cannot be started at the same time, otherwise an error will occur. Please close the FlashMagic software after downloading the program and then start the serial port debugging software.
    Since the serial port has always been a standard interface provided by various computer systems, the debugging software for the serial port can be found everywhere on the Internet. Of course, if you are interested, you can also design a serial port debugging software yourself.
    Here we use a software called COMPortDebuger, which is easy to use and has the function of automatically saving large amounts of data, which is very important. The interface after the software is started is shown in Figure 8.
    The website of the software author is displayed in the sending area and the receiving area, and you can go there to download the latest version.
    After the user board program is running and the serial port debugging is set up, you can click "Open Serial Port". At this time, various data sent through the serial port will be displayed in the receiving area.
    The website (www.dpj.com.cn) gives the source program of the P89C664 in the forwarding device, and the necessary comments are attached to the program.
    Conclusion
    This article introduces the application of the P89C664ISP function in detail, and uses a simple online download device to program the data forwarding and saving of the I2C bus; at the same time, it gives a detailed initialization of the I2C hardware interface and the source program of the entire device. It can be used for automatic saving, editing, analysis, printing, etc. of various large quantities of I2C bus data. It can also be used in general development to test whether your program meets the requirements.

 

 

The ISP of Philips chips is mainly implemented through the serial port.

The software on the PC side is FlashMagic, which was jointly developed by Philips and a certain company.
The software is free and can be accessed through the Philips website.
It basically supports  the full range of Philips 51 MCUs that support ISP. The way

Philips  MCU enters the ISP  BootLoader is relatively complicated.
I remember that under the condition of RST=1, nPSEN flips 3 times. (Except for the LPC9xx series)
Therefore, in order to realize the ISP function, the serial port line needs to transmit 4 signals:
TXD, RXD: standard serial data signals;
DTS: MCU  reset signal;  RTS: nPSEN  control signal.
Of course, there is also a ground line.

The specific signal line connection method is clearly described in the AppNote of FlashMagic, just follow the instructions.

Keywords:Philips  MCU  ISP Reference address:Philips enhanced 8051 core microcontroller ISP simple operation steps

Previous article:A perpetual calendar optimization algorithm source program for 51 series single chip microcomputer
Next article:MCS-51 MCU Practical Subroutine Library 5

Recommended ReadingLatest update time:2024-11-16 14:42

Design of a new LED dot matrix display control system based on PIC32 microcontroller
Background of the project: LED dot matrix display is a large display system that integrates microelectronics technology, computer technology, and information processing technology. It has become an ideal choice for many display media and outdoor operation displays due to its bright colors, wide dynamic range, high b
[Microcontroller]
Design of a new LED dot matrix display control system based on PIC32 microcontroller
STC MCU controls BH1750 to measure light intensity
/****Note: The minimum value of this program is 00212lux. There may be some problems with the timing. Sometimes, if you change it randomly, it will always be 00212 or 00000.****/ /****And the data changes are discontinuous 00212,00425,00639,00852,01065, etc.****/ /****Supplement on October 18, 2016: Later I found th
[Microcontroller]
STC MCU controls BH1750 to measure light intensity
An example of using the microcontroller plus 1 instruction
The purpose of the addition instruction   INC A  INC Rn  INC direct  INC @Ri  INC DPTR  is very simple, that is, to add 1 to the value in the subsequent target. Example: (A) = 12H, (R0) = 33H, (21H) = 32H, (34H) = 22H, DPTR = 1234H. Execute the following instructions:  INC A (A) = 13H  INC R2 (R0) = 34H  INC
[Microcontroller]
AVR MCU Tutorial - Digital Output
From the previous tutorial, we know that the input of buttons and switches is essentially the reading of digital signals. This tutorial will talk about the principle of controlling LEDs, which is the output of digital signals. Digital IO is the simplest and most basic of all the contents of microcontroller programming
[Microcontroller]
AVR MCU Tutorial - Digital Output
MCU C_FILE_MARQUE
#include"reg51.h" #define uchar unsigned char #define uint unsigned int sbit LED=P3^6; //delay for 1ms void delay1ms(uint t) {   uint i;   uchar j;   for(i=0;i t;i++)       for(j=0;j 120;j++); } //main void main() {   uint m,n;   LED=0;   for(m=0;m 256;m++)       {         P0=m;         delay1ms(3
[Microcontroller]
Small air compressor control device based on PIC microcontroller
1 Introduction The PIC16 series microcontroller from Microchip of the United States is a new type of 8-bit microcontroller using CMOS technology. Due to its low power consumption, ultra-small size, low cost, and complete functions, it is a cost-effective microcontroller that is very suitable for use in various
[Microcontroller]
Small air compressor control device based on PIC microcontroller
Pulse Measurement Instrument Based on Single Chip Microcomputer
0 Introduction The pulse tester is an electronic instrument used to measure the number of times a person's pulse beats. It is also the main component of the electrocardiogram. Therefore, it plays an important role in modern medicine. Although there are many instruments for detecting pulses, there are few portable ful
[Microcontroller]
Pulse Measurement Instrument Based on Single Chip Microcomputer
AVR microcontroller PWM speed regulation program and schematic diagram
Source program: #include iom16v.h #include macros.h #define uint unsigned int #define uchar unsigned char #define Left OCR1A #define Right OCR1B #define ADD 1.15; //macro definition, acceleration coefficient flying i; uchar flag; //Whether to decelerate flag float TCRT5000_IN; uint Max_Speed; uchar Min_Speed;
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components
Guess you like

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号