当前位置:文档之家› Release Notes for C51

Release Notes for C51

Release Notes for C51
Release Notes for C51

Release Notes for C51

8051 Development Tool Kits

This file contains release notes and last minute changes that are not found in the

printed manuals.

Information in this file, the accompany manuals, and software is

Copyright ? Keil Software, Inc and Keil Elektronik GmbH.

All rights reserved.

Contents

1.What's New in C51

2.Example Programs

3.Device Database?

4.Peripheral Simulation

5.Technical Support

6.Contact Details

What's New in C51

The following sections list the changes instituted in each release of the C51 toolset. C51 Version 9.01 Release

?[C51 Compiler]

?Corrected: when MODDA is used and int numbers are multiplied and assigned to long, the result is potential incorrect.

?[Device Support]

?Added: debug support for Infineon XC82X devices.

?[New Supported Devices]

?Infineon XC822T-0F, XC822M-1F, XC822MT-1F, XC824MT-1F, and XC824M-1F devices.

C51 Version 9.00 Release

?[μVision4]

?This C51 release comes with the new μVision4 IDE.

?[New Supported Devices]

?Evatronix R8051XC(1 DPTR), R8051XC2(1 DPTR), R8051XC2(2 DPTR), R8051XC2(8 DPTR), R8051XC2-A(1 DPTR), R8051XC2-A(2

DPTR), R8051XC2-A(8 DPTR), R8051XC2-AF, R8051XC2-B(1 DPTR),

R8051XC2-B(2 DPTR), R8051XC2-B(8 DPTR), and R8051XC2-BF

devices.

?Nordic nRFLU1P-F16 and nRFLU1P-F32 devices.

?NXP P89LPC9361 device.

?Silabs C8051F580, C8051F581, C8051F582, C8051F583, C8051F584, C8051F585, C8051F586, C8051F587, C8051F588,

C8051F589, C8051F590, and C8051F591 devices.

?[Device Support]

?Corrected: device settings for Infineon XC888-6FF, XC888CM-8FF, XC888LM-6FF, XC886-6FF, XC866L-1FR, XC866L-2FR, XC866L-4FR,

and XC864-1FRI devices.

?Corrected: device settings for Nordic Semiconductor nRF24E1, nRF24E2, nRF9E5, nRF24LU1, and nRF24LE1 devices.

?Added: debug support for NXP P89LPC9361 and P89LPC954 devices in the LPC900 EPM Emulator/Programmer.

?Updated: LPC900 EPM flash programmer configuration dialog to support devices with 16 flash sectors.

?[CX51 Compiler]

?Corrected: constant folding of two negative array index values. For example:

?unsigned char arr[512];

?unsigned int i;

?

i = arr[i-1-5]; // incorrect in C51 V8: arr[i-4] instead of arr[i-6]

?Corrected: when using the NOAREGS directive, complex arithmetic with nested calls may create incorrect results. For example:

?#pragma NOAREGS

?

?int result;

?extern char f(unsigned char idx);

?

result = (f(1)*0x100+f(0)) - (f(3)*0x100+f(2)); // incorrect result.

POP destroys value in ACC

?LX51 Linker/Locater]

?Corrected: when using OPTIMIZE(10) or above, there was a potential that common code blocks are called incorrectly. Therefore programs

may have operated incorrectly.

?[BL51 Linker/Locater]

?Corrected: when using RTX51 user interrupt functions were

overlapping with RTX ISR vectors which resulted in a linker warning.

?Corrected: data overlaying may not work when the last input module contains an interrupt function; the linker incorrectly issues WARNING

16: main uncalled.

C51 Version 8.18 Release

?[Device Support]

?Added: debug support for NXP P89LPC9408 in the LPC900 EPM Emulator/Programmer.

?[New Supported Devices]

?Nuvoton W681308 device.

?NXP P89LPC9201, P89LPC9211, P89LPC922A1, P89LPC9241, P89LPC9251, P89LPC9301, P89LPC931A1, P89LPC9331, P89LPC9341,

and P89LPC9351 devices.

?Silabs C8051F500, C8051F501, C8051F504, C8051F505,

C8051F506, C8051F507, C8051F508, C8051F509, C8051F510,

C8051F511, C8051F700, C8051F701, C8051F702, C8051F703,

C8051F704, C8051F705, C8051F706, C8051F707, C8051F708,

C8051F709, C8051F710, C8051F711, C8051F712, C8051F713,

C8051F714, and C8051F715 devices.

?[ULINK2 Support]

?Corrected: potential deadlock on ST uPSD targets with ULINK2 solved.

?[Device Simulation]

?Corrected: Infineon XC800 simulation of the MDU was incorrectly implemented.

?Corrected: For C8051F12x/F13x devices the EXFn and TOGn behavior matches with latest information from SiLABS.

?Added: simulation for Atmel AT89C51RE2. The second UART is now available for the simulation.

?[CX51 Compiler]

?Corrected: initialization failed on far addresses when the object is located with _at_. For example:

?#pragma VARBANKING O2

?

?unsigned char far array[65530] _at_ 0x150006;

unsigned long x1 = (unsigned long)(array); // incorrect address

stored in 'x1'.

C51 Version 8.17a Release

?[Device Support]

?Added: debug support for the follow devices from Analog Devices ADE5166, ADE5169, ADE5566, ADE5569, ADE7166F16, ADE7166F8,

ADE169F16, ADE7566F16, and ADE7566F8 in the ADI Monitor

Driver.

?Added: debug support for NXP P89LPC9321 and P89LPC9351 devices in the LPC900 EPM Emulator/Programmer.

?[Device Support]

?Added: Nuvoton devices in the device database.

?Corrected: Port Pin P2.2 is available (instead of P2.5) on NXP P89LPC917 devices. This is now reflected in the peripheral dialogs.

?Corrected: UART0 baudrate is now correctly displayed when Timer2/3/4 is used as baudrate generator on SiLabs C8051F13x

devices.

?[Device Simulation]

?Corrected: simulation of Reset Source Register (RSTSRC) and SFR Page Control Register (SFRPGCN) for SiLabs C8051Fxxx devices.

?Corrected: handling of Automatic Page Control Enable (SFRPGCN) and Reset Source Register (RSTSRC) for SiLabs C8051Fxxx devices.

?Corrected: simulation of PLLLCK (PLL Lock Flag) for SiLabs

C8051F12x/13x devices. PLLLCK is now set when PLL is configured

correctly and frequency is locked.

?Added: support for V: user-defined memory area for NXP 80C51MX devices.

?Corrected: simulation issues with the Evatronix R8051XC peripherals DMA and interrupt.

?[CX51 Compiler]

?Corrected: when two long operands are loaded from complex arrays (each with object size bigger than 256 bytes), there was a potential

register overwrite in register R0. The result of the long operation was in

such cases incorrect.

Example:

?struct s2 { unsigned int idx : 1; } s2;

?struct s { unsigned long l1; unsigned char a[256]; unsigned long l2; } xdata sarr[2];

?

?unsigned long l;

?

?void main (void) {

? l = sarr[s2.idx].l1 + sarr[s2.idx].l2; // incorrect result of long addition

?}

?[AX51 Macro Assembler]

?Corrected: in NXP 80C51MX mode, DATA, IDATA, and EDATA can be placed to absolute addresses 0x7F0000 and above. This is now

accepted.

?Added: ECRM directive that allows to expand generic CALL

instructions to ECALL for NXP 80C51MX devices.

C51 Version 8.16a Release

?[CX51 Compiler]

?Corrected: when int numbers are multiplied and assigned to long, the result is potential incorrect. This problem has been introduced in V8.15.

?Corrected: C51 _at_ problem with linker code packing fixed.

?[AX51 Macro Assembler]

?Enhanced: for the NXP MX devices, CALL/JMP instructions are encoded to ECALL/JMP when needed..

?[Device Support]

?Added: ULINK and Infineon DAS (Device Access Server) support for the XC864 device.

?Enhanced: Evatronix R8051XC XDATA Banking example optimized.

?Enhanced: Infineon XC800 startup code.

?Added: Support for Infineon XC864 including a Blinky example.

?Added: Syntek Semiconductors STK6031 and STK6032 devices to device database.

?[Device Simulation]

?Added: for SiLABS C8051F360/1/2/3/4/5/6/7/8/9 and

C8051F410/1/2/3.

C51 Version 8.15 Release

?[Cx51 Compiler]

?Corrected: interrupt functions combined with NOINTVECTOR where not detected by the linker as new root and an incorrect linker warning

was reported.

?Corrected: when using Dallas 390 mode with ROM(D512K) or ROM(D16M), pdata arrays could not be located anywhere in memory.

?Corrected: when using the XCROM directive in combination with function pointers, constant initializations where omitted.

?Enhanced: long multiplication with two unsigned int/char arguments has now a much higher performance.

?[Target Support]

?Added: support for the Infineon USCALE XC800 hardware via the Infineon DAS Client for XC800.

?[Device Simulation]

?Corrected: access to MACACC was not corrected simulated for SiLABS C8051F12x and C8051F13x devices.

?Added: device support and simulation for Infineon XC878.

?Added: simulation for new peripherals (Software Reset, RTC, DMA) on Evatronix R8051XC core.

?Added: xdata banking support for Evatronix R8051XC core.

?[LX51 Linker/Locater]

?Corrected: Linker Code Packing may combine incorrectly blocks from several code banks into common areas.

?[ULINK2 Support]

?Added: Debug and Flash-Programming support for NXP P89LPC952 and P89LPC954.

C51 Version 8.12 Release

?[Device Simulation]

?Added: device support and simulation for SiLABS

C8051T600/1/2/3/4/5 and C8051T610/1/2/3/4/5/6/7.

?[Cx51 Compiler]

?Corrected: nested call with struct pointer arguments where

incorrectly processed.

?[LX51 Linker/Locater]

?Corrected: sfr16 definitions in assembly code and C source file may generate Warning L46: SFR SYMBOL HAS DIFFERENT VALUE.

C51 Version 8.11a Release

?[Device Support]

?Added: support for Ramtron VRS51L3072 and VRS51L3174.

?Added: support for Nordic Semiconductor nRF24LU1.

?[Device Simulation]

?Added: device support and simulation for SiLABS C8051F336, C8051F337, C8051F338, and C8051F339.

?Corrected: PORTx and PCA output pins on SiLABS C8051F12x did not correctly update in simulation.

C51 Version 8.10 Release

?[Device Support]

?Added: support for Megawin MPC82G516A and MPC82L54A.

?Enhanced: startup code for Infineon XC800 devices has now selections for device variants. Infineon XC88x AC step devices requires

to set the device to VCO bypass mode before PLL switching.

?Added: support for NXP P89V52X2.

?[Device Simulation]

?Corrected: simulation of MULRDY and OSCICL corrected for SiLABS C8051F3xx series.

?Enhanced: simulation of Evatronix R8051XC watchdog timer with optional prescaler. For details refer to Application Note 191: Toolchain

Extensions for R8051XC Core.

?Corrected: DPTR simulation of Evatronix R8051XC; when 2 DPTR where selected the auto-increment feature (DPC register) did not work.

Two R8051XC devices are now in the device database: R8051XC (8

DPTR) with simulation for 8 DPTR, R8051XC (2 DPTR) with

simulation for 2 DPTR.

?Corrected: SiLABS simulation for UART #1 had a problem with the transmit interrupt bit (TI) when SFR page was set to 1.

?[Cx51 Compiler]

?Corrected: the MODC2 directive did not correctly save and restore multiple DPTR registers on interrupt entry/exit.

?Corrected: Assembler instructions inserted with #pragma ASM trigger now register usage of all CPU registers and therefore avoids

register clashes.

?Corrected: strcmp and strncmp library functions changed from signed char to unsigned char compare (ANSI requirement).

?Improved: detection of conflicting memory types when used in combination with typedef's, for example:

?typedef char code CCHAR;

?typedef CCHAR xdata XCHAR; // generates now WARNING C185: different memory space

CCHAR idata var2; // generates now WARNING C185: different

memory space

?[LX51 Linker/Locater]

?Corrected: REMOVEDUNUSED did not correctly work with SROM symbols and linker code packing.

?Corrected: debug symbols of absolute bits generated in AX51 had wrong offset.

?Corrected: segment locating with the LAST keyword generated unnecessary memory gaps when used with code banking.

?Corrected: when linker code packing is used, an address reference to far variables with _at placement was wrong.

?[BL51 Linker/Locater]

?Corrected: segments with a AJMP instruction as last instruction where located at the end of a 2KB block which generated a linker error.

?[ULINK and ULINK2 Support]

?Corrected: Verify failed on μPSD devices when common segments where located to code banks, but no bank 0 exists.

C51 Version 8.09 Release

?[Device Simulation]

?Corrected: wrong timing of the Timer 1 in the Infineon XC800 devices.

?Corrected: clock calculation of Infineon XC88x devices was incorrect.

?Corrected: Dallas D80C400 simulation did not correctly switch to contiguous mode.

?Added: Simulation for Atmel AT89C51AC3.

?[Device Support]

?Corrected: when debugging Infineon XC800 Devices with the DAS interface data/idata variables where shown incorrectly.

?[Target Debugging for Analog Devices ADuC83x, ADuC84x, and ADE7xxx]

Options - Project - Debug - Use: ADI Monitor Driver selects target

driver for the Analog Devices ADuC834, ADuC84x, and ADE7xxx devices.

This driver is now extended to support the 1-Pin Pod interface and the new

ADE7xxx devices.

?[Monitor-51, Monitor-390]

?Corrected: potential communication problems with low-cost USB-COM adapters.

?[Cx51 Compiler]

?Corrected: a code generation problem with bit-field arrays when the array index is a function return value.

C51 Version 8.08a Release

?[Device Simulation]

?Corrected: the previous version had a delay when starting signal functions. This delay is now removed so that the startup behavior is

identical to releases before version 8.06.

?Corrected: the behavior of JBC instructions on I/O ports was not fully correct. JBC instructions now read the SFR register (Px) instead of the

I/O port value (PORTx).

?[Cx51 Compiler]

?Corrected: integer promotion was missing on complex arithmetic with char/unsigned char and multiplication or division.

?[Ax51 Macro Assembler]

?Enhanced: the _DATE2_ macro is now defined also for the A51 and AX51 Macro Assembler.

?[uVision3 IDE]

?Corrected: potential crash in the project window on right mouse click when no item was selected.

?[Device Support]

?Corrected: Peripheral display for Port 4 and Port 5 of the NXP 89LPC952 device was missing.

?Enhanced: on XC800 devices the dialog Project - Options - Debug - ULINK Settings - Disable interrupts during steps is implemented.

This option disables interrupts during single-stepping and therefore

executes only instructions from the current function.

?Added support for Infineon TLE78xx series.

?Corrected: simulation for external interrupt inputs EINT0 and EINT1 on Infineon XC800 devices.

?Corrected: debugger startup problems with the Infineon DAS server. C51 Version 8.06 Release

?[Device Support]

?Infineon XC800 Devices: added debugging and flash programming support for new Infineon XC800 devices (XC866-1FR, XC856) with

ULINK and Infineon DAS server.

?Enhanced: Infineon XC800 startup code START_XC.A51 V1.02 that supports pdata addressing (C51: USING PDATA VARIABLES ON

INFINEON XC800).

?SST SmartCards: added core features for device simulation.

?[Device Simulation]

?Corrected: interrupt vector for 2nd UART on Philips P89LPC952 was incorrectly configured in simulator and target dialog.

?Enhanced: VTREG PPAGE is initialized to 0 on all Philips LPC900 devices to allow simulation of MOVX @Ri without configuration.

?Corrected: a problem with AT89S8252 EEPROM simulation.

?Corrected: a problem with the baudrate generation on Atmel devices with X2 feature (the baudrate was displayed incorrect).

?Corrected: a problem with code banking on Mentor M8051EW core.

?[Cx51 Compiler]

?Corrected: code that is not used (i.e. with macros) is removed, even when it creates other side effects.

?Corrected: unexpected error message for syntactical correct statement.

?struct st2 { unsigned char uc1; unsigned char uc2; };

?struct st1 { struct st2 st2; unsigned char u1; unsigned char u2; };

?struct st1 st;

?

?void main (void) {

? (&st.st2)->uc1 = 0; // gives error, but should be Ok.

}

?Corrected: library function toint did no flag values 0x3A - 0x40 as incorrect.

?[ULINK and ULINK2 Support]

?Added: support for ULINK2 for the Infineon XC800 and ST uPSD series.

?Added: device support for Infineon XC886, XC888, and XC856.

C51 Version 8.05 Release

?[Device Simulation for Infineon XC88x Series]

Added device simulation for Infineon XC886 and Infineon XC888.

?[Device Simulation for Philips P89LPC952/954]

Corrected: the two serial windows did not work for the Philips

P89LPC952/954 devices.

?[Device Simulation for M8051EW]

Corrected: when M8051EW features were enabled, it was not possible to

debug non-banking applications.

?[Device Simulation for R8051XC]

Enhanced: some features were not covered in the first revision of the

simulator. Now the simulator also takes care about peripheral timing, and

write operations to code memory.

?[LX51 Linker/Locater]

Corrected: when using interbank call table optimization

(?B_RST_BANK != 0xFF), the linker was optimizing too much.

?[ULINK Driver for ST uPSD]

Corrected: flash programming did not work for uPSD3422 devices.

?[Cx51 Compiler]

?Enhanced: C51 did issue an error when accessing struct members with s->member instead of s.member.

?Corrected: using multiple dummy assignments to remove unused variables may cause register overwrites.

?Corrected: potential code problems when incrementing far pointers with long constants.

?void func (void) {

? unsigned int i;

? long far* entry;

?

? while(i) {

? i--; // increment missing

? entry += 1L; // due to 'far' pointer increment with 1L

? }

}

?Corrected: potential problem on SmartMX, when using Optimize level

8 or 9 without OBJECTADVANCED.

?#pragma MXP

?int xdata x;

?char xdata * xdata p;

?

?void f1 (char *);

?void f2 (char *);

?

?void main (void) { // uses CMPW instruction that affects 'Z' flag

? if (x == 0xFFFF) f1 (p); // MOVX A,Rx,@DPTR destroys 'Z' flag

? else f2 (p); // and cannot be combined

}

C51 Version 8.04 Release

?[Cx51 Compiler]

?Enhanced: The Warning C259: pointer: different mspace is improved and covers now also situations where an address value is assigned.

?New: The Warning C289: converting non-pointer to pointer is issued when a integer value is assigned to a pointer.

?Corrected: A problem with the SRC file output is wrong with optimized address values.

?Corrected: dummy read to MD3 was missing for int*int multiplication when using the Infineon/Evatronix MDU.

?Added: Support for the SiLABS Arithmetic Accelerator (available in C8051F12x and F13x devices) in the far banking library.

?[Device Support for Evatronix/Cast R8051XC Core]

Added complete simulation and compiler support for the features of the

R8051XC core. Detailed information is provided in Application Note 191:

Toolchain Extensions for the R8051XC Core.

?[Device Support for Mentor M8051EW Core]

Enhanced simulation support for the Mentor M8051EW memory extension

features. It is now possible to simulate code banking and far memory

applications and the address of the The address of the extension

corefeatures of the R8051XC core. Detailed information is provided in

Application Note 171: Using M8051EW Memory Extension.

?[Device Support for Infineon XC800 Series]

Added ULINK debugging support and DAS driver for new Infineon XC800

devices (XC886, XC888). Detailed information is

?[BL51 and LX51 Linker/Locater]

Corrected: there might be incorrect WARNING L15: MULTIPLE CALL TO

FUNCTION messages when using syntax: OVERLAY (* ! (func1,

func2,func3,...)) to group more than just two functions.

C51 Version 8.02 Release

?[uVision Debugger]

Added peripheral simulation support and target debugging dialogs for the

following devices:

?Atmel AT89C51RE2, AT89C51IE2, AT89C51CC03, AT8xC51SND1, AT89S8253, AT89LP2052, AT89LP4052

?Revised: Atmel AT89C5131/AT89C5131A (added TWI), AT8xC5132 (added TWI, ADC)

?Philips P89LPC9102, P89LPC9103, P89LPC9107. P89LPC9221, P89LPC9311, P89LPC932A1, P89LPC938,

?Philips P89LPC9401/P89LPC9408 (without LCD Driver), P89LPC952, P89LPC964, P89LPC966

?Philips P89V660, P90V662, P89V664

?[LX51 Linker/Locater]

Corrected a problem with code banking, the linker reported incorrectly

error L124: BANK SWITCH MODULE INCORRECT.

?[Cx51 Compiler]

Corrected a macro expansion problem, array index calculations with

negative offset, and far access to absolute memory locations.

?[Target Debugging Support for Infineon XC800 Series]

Added ULINK debugging support and DAS driver for new Infineon XC800

devices (XC886, XC888).

?[ULINK Driver for ST uPSD]

Added new JTAG device ID's for ST uPSD3212, uPSD3312, and

uPSD3422.

C51 Version 8.01 Release

?[uVision Debugger]

Added peripheral simulation support and target debugging dialogs for the

following devices:

?Silicon Labs C8051F120, Silicon Labs C8051F121, Silicon Labs C8051F122, Silicon Labs C8051F123,

?Silicon Labs C8051F124, Silicon Labs C8051F125, Silicon Labs C8051F126, Silicon Labs C8051F127,

?Silicon Labs C8051F130, Silicon Labs C8051F131, Silicon Labs C8051F132, Silicon Labs C8051F133

?[P89LPC952 and MCB950 Board Support]

Added support for Philips P89LPC95x device series.

?[AX51 Macro Assembler]

Corrected a problem with forward references in symbols which generates

an error message.

?[LX51 Linker/Locater - Code Packing]

Corrected a potential problem with code packing when modules are

translated with different optimization levels (less than 8) but the

OBJECTADVANCED directive.

?[L51_BANK.A51 - Code Banking Configuration File]

Changed behavior of the ?B_RESTORE_BANK entry with ?B_MODE=0 to

avoid glitches when using the RTX51 or RTX51 Tiny operating system

together with code banking.

?[Cx51 Compiler]

Version number changed for logistic reasons. No other changes compared

to V8.00.

C51 Version 8.00 Release

?[uVision3 IDE]

The μVision3 IDE contains several enhancements orrected: the device

simulation covers now the latest timing specification for Dallas DS89C420,

DS89C430, DS89C440, and DS89C450 devices. The timer simulation was

previously based on a older data book and therefore incorrect.

?[Device Simulation]

?Corrected: the device simulation covers now the latest timing specification for Dallas DS89C420, DS89C430, DS89C440, and

DS89C450 devices. The timer simulation was previously based on a

older data book and therefore incorrect.

?[Target Debugging for Analog Devices ADuC83x and ADuC84x]

Options - Project - Debug - Use: ADI Monitor Driver selects target

driver for the Analog Devices ADuC834 and ADuC84x devices. This driver

directly connects via a serial COM interface to the on-chip

Download/Debug Kernel of the ADuC device. No specific monitor or

firmware is required. A detailed documentation is available in the Analog

Devices ADuC83x/84x Download/Debug Driver User's Guide

(..\C51\HLP\MonADI.CHM).

?[Support for Infineon XC866]

Added complete support for new Infineon XC800 Device series including

device simulation, ULINK driver, and MCBXC866 Evaluation Board

support.

?Example projects are provided in the

folder ..\C51\Examples\Infineon XC866.

?Complete documentation is available in the MCBXC866 User's Guide (..\C51\HLP\MCBXC866.CHM) which also explains the ULINK

driver.

?[Support for ST uPSD34xx Series]

Added complete ULINK support for new ST uPSD34xx device series.

?[C Library]

?Corrected: on Dallas 390, 400, 5240, and 5250 devices tan (INF) generated a wrong return, and printf ("%f") did not print the floating

point value INF and NaN.

?Corrected: the return value of scanf and sscanf was just 0xFF instead of -1 when no arguments where processed.

?Corrected: the library takes care about the changed behavior of the Memory Accelerator on Dallas DS80C390 Rev. C.

?Corrected: on Dallas 390, 400, 5240, and 5250 devices memmove in xdata memory failed when source buffer is overlapping destination

buffer.

C51 Version 7.50a Release

?[LX51 Linker/Locater]

?Corrected: potential problem with Linker Code Packing that might cause in-efficient operation or a MEMORY SPACE OVERLAY warning.

?Corrected: fixup error messages when using the REMOVEUNUSED directive.

?Corrected: when using L51_BANK.A51 the far memory addressing used a wrong offset (-64KB). Instead of X:0x20000 the X:0x10000 was

addressed.

?[BL51 Linker/Locater]

The new BL51 Linker/Locater was by accident not included in Version

7.50.

?[C Library]

Corrected a problem on Dallas 390, 400, 5240, and 5250 devices with log

and log10 when const data is not in stored in segment 0

(C:0x0000-C:0xFFFF).

C51 Version 7.50 Release

?[uVision2 Debugger]

Added Extended Memory Simulation for Mentor M8051EW. Refer to

Application Note 171: Using M8051EW Memory Extension in the

folder \C51\EXAMPLES\M8051EW.

Added peripheral simulation support and target debugging dialogs for the

following devices:

?Dallas Semiconductor DS89C420,

?Dallas Semiconductor DS89C430,

?Dallas Semiconductor DS89C440,

?Dallas Semiconductor DS89C450,

?Silicon Labs C8051F000,

?Silicon Labs C8051F001,

?Silicon Labs C8051F002,

?Silicon Labs C8051F005,

?Silicon Labs C8051F006,

?Silicon Labs C8051F007,

?Silicon Labs C8051F010,

?Silicon Labs C8051F011,

?Silicon Labs C8051F012,

?Silicon Labs C8051F015,

?Silicon Labs C8051F016,

?Silicon Labs C8051F017,

?Silicon Labs C8051F350,

?Silicon Labs C8051F351,

?Silicon Labs C8051F352,

?Silicon Labs C8051F353,

?SST SST89E554RC,

?SST SST89E564RD,

?SST SST89V554RC,

?SST SST89V564RD.

?[ISD51 In-System Debugger]

Added example configuration for Dallas DS89C420, DS89C430,

DS89C440, and DS89C450 devices. For details refer to Application Note 177: Using ULINK with STMicroelectronics Turbo μPSD 3300/3400

Devices and the sample projects in the folder ..\C51\EXAMPLES\ST uPSD.

?[C51 Compiler]

?Corrected a code generation issue for negative array index values.

For example:

?signed int i = v1 - v2;

?value = table [i + 4]; // code works for 'signed char' index ? // but fails with 'signed int' index

?Added MODC2 Compiler Directive:enables use of dual data pointers available on the Cast and Evatronix R80515 core. Using

additional data pointers improves the performance of the following

library functions: memcpy, memmove, memcmp, strcpy, and

strcmp.

?Added MODH2 Compiler Directive: enables use of dual data pointers available on Hynix, ST uPSD 33xx, and ST uPSD 34xx devices.

Using additional data pointers improves the performance of the

following library functions: memcpy, memmove, memcmp, strcpy, and strcmp.

?[CX51 Compiler]

Corrected the following problems for the SmartMX instruction set:

?Switch/case with long types and ROM(HUGE).

?Over optimization with CMPW instruction.

?Stack adjustment failure with setjmp/longjmp library routines.

?[C Library]

Corrected several library problems including:

?Corrected a problem on Dallas 390, 400, 5240, and 5250 devices with asin, acos, and atan when const data is not in stored in segment

0 (C:0x0000-C:0xFFFF).

?The labs function has been optimized and is now fully reentrant.

?Added configuration symbol ?C?DPSEL that defines DPSEL SFR address for MOD517(NOAU) multiple DPTR support. May be used for Mentor M8051EW based devices which have the Infineon method for

multiple DPTR but with a different DPSEL SFR address. The ?C?DPSEL definition shown below may be included in a chip-specific Startup.A51 file. Without this definition, the DPSEL register is accessed at the default address 0x92.

?PUBLIC ?C?DPSEL

?C?DPSEL DATA 0A2H ; define DPSEL address for Mentor M8051EW

?[LX51 Linker]

Added the REMOVEUNUSED (abbreviation RU) directive which removes unused program and data segments provided that Data Overlaying is enabled.

?[ULINK]

Added instruction trace support to the STMicroelectronics uPSD ULINK Driver. For details refer to Application Note 177: Using ULINK with

STMicroelectronics Turbo μPSD 3300/3400 Devices and the sample

projects in the folder ..\C51\EXAMPLES\ST uPSD.

?[BL51/LX51 Linker]

Improved the OVERLAY directive. Now, using OVERLAY (* ! (func1, func2)), you may combine the segments of several function call trees.

This is useful for interrupt functions that have overlayable data but use the same interrupt level. Such interrupt functions cannot interrupt each other.

Therefore, data overlaying of both call trees is possible. For example:

?void irq0 (void) interrupt 0 {

? unsigned char arr[10];

? arr[0] = 0;

?}

?

?void irq1 (void) interrupt 1 {

? unsigned char arr[10];

? arr[0] = 0;

? }

If irq0 and irq1 are set to the same priority level their data areas may be

overlaid. The OVERLAY directive may be specified to do that as follows:

BL51 ... OVERLAY (* ! (irq0, irq1))

The linker map file shows the following OVERLAY MAP.

SEGMENT DATA_GROUP

+--> CALLED SEGMENT START LENGTH

----------------------------------------------

?PR?IRQ1?I 0008H 000AH

*** NEW ROOT *********************************

?PR?IRQ0?I 0008H 000AH

Note that both functions' call trees are overlaid.

C51 Version 7.20 Release

?[uVision2 Debugger]

Added peripheral simulation support for the following devices:

?Analog Devices ADuC841,

?Analog Devices ADuC842,

?Analog Devices ADuC843,

?Analog Devices ADuC845,

?Analog Devices ADuC847,

?Analog Devices ADuC848,

?Altium Nexar TSK51x MCU Core,

?Cast/Evatronix R8051 MCU Core,

?Cast/Evatronix R80515 MCU core,

?DCD DR8051 MCU core,

?DCD DR80390 MCU core,

?DCD DR8051XP MCU core,

?DCD DR80390XP MCU core,

?Mentor M8051EW MCU core,

?TI MSC1200Y2,

?TI MSC1200Y3.

CPU core simulation may be expanded with user peripherals using the

AGSI Interface.

?[ISD51 Configuration Examples]

Added ISD51 configuration for the TI MSC1200. Refer to Application Note

183: Use ISD51 on TI MSC1200 for more information.

?[ISD51 Configuration Examples]

Revised the configuration for Philips LPC900 to match the current Philips

LPC900 device versions.

?[FlashMonitor]

Added a new configuration for the Atmel AT8xC5122. Current

configurations support almost all new Atmel device variants and are

summarized in the \KEIL\C51\FlashMon\ReadMe.txt file.

?[C51 Compiler]

Added intrinsic functions _push_ and _pop_ that may be used to save

and restore sfr registers in interrupt functions.

?[C51 Compiler]

Added support for the Silicon Labs C8051F12x multiply and accumulate

unit (MAC0). The MDU_F120 directive enables use of MAC0 for int and

long multiplication and long shift operations.

?[CX51 Compiler]

Corrected a problem with far pointers and long arithmetic.

?[ULINK Driver for ST μPSD series]

Corrected a problem while programming Flash memory that caused the

microcontroller to execute random instructions. The MCU is now forced

into RESET while programming the Flash.

C51 Version 7.10 Release

?[uVision2 Debugger]

Added simulation support for the following devices:

?Philips P89LPC935 and other downgraded LPC900 devices

?Philips P89C669

?ST μPSD33xx

?[uVision2 Debugger]

Corrected A/D converter simulation of the ADuC831.

?[LX51 Linker Code Packing]

Corrected a problem with code packing and JMP optimizations.

51单片机用C语言实现交通灯(红绿灯)源程序

51单片机用C语言实现交通灯(红绿灯)源程序 2009-10-29 23:00 交通灯,红黄绿灯交替亮,怎样实现呢?其实就是根据单片机定时器及倒计时的程序修改。源程序如下: /* 1、程序目的:使用定时器学习倒计时红绿灯原理主要程序和倒计时一样 2、硬件要求:数码管、晶振12M */ #include bit red,green,yellow,turnred; //定义红、黄、绿及转红标志 code unsigned char tab[]= {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; //共阴数码管 0-9 unsigned char Dis_Shiwei;//定义十位 unsigned char Dis_Gewei; //定义个位 void delay(unsigned int cnt) //用于动态扫描数码管的延时程序 { while(--cnt); } main() { TMOD |=0x01;//定时器设置 10ms in 12M crystal定时器0,工作方式1,16位定时器 TH0=0xd8; //65535-10000=55535=D8F0(十六进制) TL0=0xf0; IE= 0x82; //中断控制,EA=1开总中断,ET0=1:定时器0中断允许 TR0=1; //开定时器0中断 P1=0xfc;//红灯亮,根据红黄绿接灯的顺序。 red =1; while(1) { P0=Dis_Shiwei;//显示十位,这里实现用8位数码管,即左1位 P2=0; delay(300);//短暂延时 P0=Dis_Gewei; //显示个位,左数,2位 P2=1; delay(300);

单片机交通灯(含程序)解析

单片机课程设计报告 题目现代交通灯的设计 专业电气工程及其自动化 班级电气081 学号3080421029 学生姓名郭琪 指导老师王水鱼老师 2010年秋季学期 起止日期:2011年1月10日至2011年1月14日 平时(10%任务完成 (30% 答辩 (30% (30%

课设报告 总评成绩 目录 一、引言 3 二、概要设计 4 2.1设计思路 4 2.2设计的主要内容和要求 4 2.3总体设计框图 5 三、硬件设计 5 3.1LED 循环电路设计 6 3.1.189c51单片机概述 6 3.1.2 LED循环说明9 3.2 倒计时显示电路11 3.2.1 74LS164芯片11 3.2.2 共阴极数码显示管12 3.2.3 倒计时电路13 3.2.4 急通车电路13 四、软件设计14 4.1程序流程图14 4.2 LED红绿灯显示14 4.3 到计时显示16 4.4急通车控制16 4.5程序代码16

五、总结16 参考文献17 附录一: 18 附录二: 19 基于51 单片机的交通灯控制系统设计

摘要:在日常生活中,交通信号灯的使用,市交通得以有效管理,对于疏导交通流量、提高道路通行能力,减少交通事故有明显效果。交通灯控制系统由80C51 单片机、键盘、LED 显示、交通灯延时组成。系统除具有基本交通灯功能外,还具有时间设置、LED 信息显示功能,市交通实现有效控制。 关键词:交通灯,单片机,自动控制 一、引言 当今,红绿灯安装在个个道口上,已经成为疏导交通车辆最常见和最有效的手段。但这个技术在19 世纪就已经出现了。 1858年,在英国伦敦主要街头安装了以燃煤气为光源的红、蓝两色的机械般手势信号灯,用以指挥马车通行。这是世界上最早的交通信号灯。1868 年,英国机械工程师纳伊特在伦敦威斯敏斯特区的会议大厦前的广场上,安装了世界上最早的煤气红绿灯。它由红绿两以旋转方式玻璃提灯组成,红色表示“停止”绿,色表示“注意”。1869年1 月2日,煤气灯爆炸,是警察受伤,遂被取消! 电气启动的红绿灯出现在美国,这种红绿灯由红黄绿三色圆形的投光器组成,1914年始装于纽约市 5 号大街的一座高塔上。红灯亮表示 “停止”绿,灯亮表示“通行”。 信号灯的出现,使得交通得以有效的管理,对于疏导交通流量、提高道路通行能力、减少交通事故有明显效果。1968 年,联合国《道路交通和道路标志信号协定》对各种信号灯的含义作了规定。绿灯时通行信号灯,面对绿灯的车辆可以直行,左转弯和右转弯,除非两一种标志禁止某一种转向。左右转弯车 辆必需让合法的正在路口内行驶的车辆和过人行横线的行人优先通行。红灯是禁行信号灯,面对红灯的车辆必需在交叉路口的停车线后停

基于AT89c51单片机实现的交通灯

江西科技师范大学 通信与电子学院《单片机应用技术》实训报告实训题目:模拟交通灯 小组成员:龚石冲罗仁敏曾建伟 班级:12电子科学与技术 指导老师:熊朝松

一、实训选题内容、要求 交通模拟灯 要求: 1、南北方向为主干道,东西方向为支路;主干路绿灯时间为45秒,红灯时间为35秒; 支路绿灯时间30秒,红灯时间为50秒,两个方向的黄灯时间都为4秒; 2、使用定时器实现时间的倒计时;用显示部件显示主干道路的倒计时变化; 3、设计三个外部按钮,分别用以手动控制紧急情况下两个方向同时禁通过;南北方向 长时间通过(不显示时间倒计时变化);东西方向长时间通过;释放按钮后则正常 通行。 二、实训计划和人员安排 经小组人员商定,分工完成任务,在课余时间完成。 若其中遇到什么问题,大家聚在一起讨论解决。具体分工如下: 1、程序编写:龚石冲 2、实体焊接:龚石冲 3、实训报告:罗仁敏 4、视频及PPT:曾建伟 三、实训选题分析 交通灯由东西南北四向灯,倒计时显示,人行横道通行指示标志等部分组成。其中东西南北四向灯中的每一向都由红、黄、绿三色灯组成;东西为一组,南北为一组。黄灯在红绿灯之间转换时亮。倒计时显示表示红、黄、绿灯亮时所剩时间。由于人行横道通行指示标志与红灯是同步的,所以在模拟交通灯时省略。交通会遇到一些突发情况。因此交通信号灯要设定一些特定功能,以防不时之需。 整个电路由单片机完成,控制部分由软件完成,硬件只负责响应。 四、方案设计 方案一:主控系统采用AT89C51单片机作为控制器,由定时器1间接控制通行倒计时及南北和东西的通行。由按键开关完成禁止通行,东西 通行,南北通行。 方案二:主控系统采用AT89C51单片机作为控制器,由延时函数完成信号灯

用51单片机控制交通灯汇编语言编写

基于51单片机的交通灯控制系统设计 摘要:在日常生活中,交通信号灯的使用,市交通得以有效管理,对于疏导交通流量、提高道路通行能力,减少交通事故有明显效果。交通灯控制系统由80C51单片机、键盘、LED 显示、交通灯延时组成。系统除具有基本交通灯功能外,还具有时间设置、LED信息显示功能,市交通实现有效控制。 关键词:交通灯,单片机,自动控制 一引言 当今,红绿灯安装在个个道口上,已经成为疏导交通车辆最常见和最有效的手段。但这个技术在19世纪就已经出现了。 1858年,在英国伦敦主要街头安装了以燃煤气为光源的红、蓝两色的机械般手势信号灯,用以指挥马车通行。这是世界上最早的交通信号灯。1868年,英国机械工程师纳伊特在伦敦威斯敏斯特区的会议大厦前的广场上,安装了世界上最早的煤气红绿灯。它由红绿两以旋转方式玻璃提灯组成,红色表示“停止”,绿色表示“注意”。1869年1月2日,煤气灯爆炸,是警察受伤,遂被取消! 电气启动的红绿灯出现在美国,这种红绿灯由红黄绿三色圆形的投光器组成,1914年始装于纽约市5号大街的一座高塔上。红灯亮表示“停止”,绿灯亮表示“通行”。 信号灯的出现,使得交通得以有效的管理,对于疏导交通流量、提高道路通行能力、减少交通事故有明显效果。1968年,联合国《道路交通和道路标志信号协定》对各种信号灯的含义作了规定。绿灯时通行信号灯,面对绿灯的车辆可以直行,左转弯和右转弯,除非两一种标志禁止某一种转向。左右转弯车辆必需让合法的正在路口内行驶的车辆和过人行横线的行人优先通行。红灯是禁行信号灯,面对红灯的车辆必需在交叉路口的停车线后停车。黄灯是警告信号,面对黄灯的车辆不能越过停车线,但车辆已经十分接近停车线而不能安全停车的可以进入交叉路口! 二概要设计 2.1 设计思路 利用单片机实现交通灯的控制,该任务分以下几个方面: a 实现红、绿、黄灯的循环控制。要实现此功能需要表示三种不同颜色的LED灯分别接在P1个管脚,用软件实现。 b 用数码管显示倒计时。可以利用动态显示或静态显示,串行并出或者并行并出实现。 C 实现急通车。这需要人工实现,编程时利用到中断才能带到目的,只要有按钮按下,那么四个方向全部显示红灯,禁止以诶车辆通行。当情况解除,让时间回到只能隔断处继续进行。 2.2总体设计框图 见图一:

单片机8255交通灯程序

单片机8255交通灯程序

交通灯程序 /*********************************************************** 十字路口交通灯控制 C 程序 ***********************************************************/ #include #define uchar unsigned char #define uint unsigned int /*****定义控制位*******************************************/ sbit Time_Show_LED2=P2^5; //Time_Show_LED2(直行时间显示)控制位 sbit Time_Show_LED1=P2^4; //Time_Show_LED1(直行时间显示)控制位 sbit EW_LED2=P2^3; //EW_LED2控制位 sbit EW_LED1=P2^2; //EW_LED1控制位 sbit SN_LED2=P2^1; //SN_LED2控制位 sbit SN_LED1=P2^0; //SN_LED1控制位 sbit SN_Yellow=P1^6; //SN黄灯 sbit EW_Yellow=P1^2; //EW黄灯 sbit EW_ManGreen=P3^0; //EW人行道绿灯 sbit SN_ManGreen=P3^1; //SN人行道绿灯 sbit Special_LED=P2^6; //交通特殊指示灯 sbit Busy_LED=P2^7; //交通繁忙指示灯 sbit Nomor_Button=P3^5; //交通正常按键 sbit Busy_Btton=P3^6; //交通繁忙按键 sbit Special_Btton=P3^7; //交通特殊按键

单片机设计方案——交通灯控制系统设计方案

单片机课程设计报告交通灯控制系统设计

摘要 本设计是针对交通灯系统的设计,由单片机AT89C51(实物用AT89S52)、键盘、LED显示、交通灯演示系统组成。单片机是把微型计算机的各功能部件集成在一块芯片中,构成的一个完整的微型计算机。AT89C51单片机是MC-51中的子系列,是一组高性能兼容型单片机,AT89C51是一个低功耗高性能的CMOS 8位单片机,40个引脚,片内含4KB Flash ROM和128B RAM,它是一个全双工的串行通行口,既可以用常规编程,又可以在线编程。 本设计中的数码管的选通采用的方法是动态显示,对每一位数码分时轮流通电显示,复位电路采用上电+按钮电平复位,时钟电路采用内部时钟产生方式。对特殊情况的处理采用中断处理方式,在中断处理程序中采用对管脚的状态查询扫描,已采取相应情况的处理。 对设计方案进行电路硬件设计,并将已编程的程序载入调试,可以得到理想的实验效果。系统包括人行道、左转、右转、以及基本的交通灯的功能.具体功能是假如 A 道和B道上均有车辆要求通过时,A、B道轮流放行。A道放行 25秒,B道放行20秒。一道有车而另一道无车,交通灯控制系统能立即让有车道放行。有紧急车辆要求通过时,系统要能禁止普通车辆通行,A、B道均为红灯,紧急车由K2 开关模拟。绿灯转换为红灯时黄灯亮 1秒钟。系统除基本交通灯功能外,还具有倒计时、时间设置、紧急情况处理、分时段调整信号灯的点亮时间以及根据具体情况手动控制等功能。

目录 1引言.......................................................................................................................................... - 1 - 1.1交通灯的重要作用........................................................................................................... - 1 -1.2该交通灯系统的特点....................................................................................................... - 1 -2系统总体方案及硬件设计 ......................................................................................................... - 2 - 2.1原理框图........................................................................................................................... - 2 -2.2设计功能........................................................................................................................... - 2 - 2.3交通灯控制系统各部分硬件组成................................................................................... - 2 - 2.3.1复位部分.................................................................................................................... - 2 - 2.3.2时钟电路部分............................................................................................................ - 3 - 2.3.3路口指示灯部分........................................................................................................ - 3 - 2.3.4显示部分.................................................................................................................... - 3 -2.4元器件清单....................................................................................................................... - 4 -3软件设计..................................................................................................................................... - 5 - 3.1交通灯控制系统软件流程图及程序分析....................................................................... - 5 - 3.1.1主程序流程图及程序模设计.................................................................................... - 5 - 3.1.2INT0中断服务程序流程图及程序模设计.............................................................. - 6 -3.2路口指示灯部分............................................................................................................... - 7 - 3.3显示部分........................................................................................................................... - 7 - 4. Proteus软件仿真 ..................................................................................................................... - 8 - 5 课程设计体会......................................................................................................................... - 10 -参考文献....................................................................................................................................... - 10 -附1:源程序代码 (13) 附2:系统原理图 (20)

用单片机控制交通灯源程序代码及流程图

用单片机控制交通灯 传统的交通灯控制电路一般由数字电路构成,电路复杂、体积大、成本高。采用单片机控制交通灯不但可以解决上述问题,而且还具有时间显示功能,非常方便。下面介绍一种用单片机控制交通灯的方法。 一、硬件硬件电路如附图。AT89C2051的P1.7~P1.5和P1.3~P1.1直接驱动红、黄、绿灯,利用单片机的串口和二片74LS164串/并转换移位寄存器实现时间显示,七段数码管为共阴管,硬件电路极为简单。 二、软件交通灯有红、黄、绿三种。红灯亮,停止通行;绿灯亮,允许通行;黄灯亮,作过渡。红灯亮60秒,绿灯亮55秒,黄灯亮5秒。每组灯的亮暗状态以2分钟为周期循环,故程序采用主、子程序方式,循环结构。另外,为了简化电路,红、黄、绿灯采用低电平点亮。 源程序清单如下: ORG0000H START:MOVDRTR,#TAB MOVSCON,#00H MOVP1,#6CH;点亮红、绿灯 MOVR0,#0;R0清零 LEFT:INCR0 CJNER0,#55,LP0;R0<55,转LP0 MOVP1,#6AH;R0=55,点亮红、黄灯 LJMPLP1 LP0:CJNER0,#60,LP1;R0<60,转LP1 MOVP1,#0C6H;R0=60,点亮绿、红灯 LJMPRIGHT LP1:LCALLDBDB LCALLDISP LJMPLEFT;20H为1,转LEFT RIGHT:DECR0 CJNER0,#5,LP2;R0>0,转LP2 MOVP1,#0A6H;R0=5,点亮黄、红灯 LJMPLP3 LP2:CJNER0,#0,LP3 MOVP1,#6CH;R0=0,点亮红、绿灯 LJMPLEFT LP3:LCALLDBDB

Release_Notes_LS-DYNA-971_R4_2_1

LS-DYNA Software Version 971 (R4.2.1) Release Notes

CONTENTS Page 1.INTRODUCTION 1 2.ENHANCEMENTS AND MODIFICATIONS MADE TO VERSION 971 RELEASE 4.2.1 2 2.1AIRBAGS 2 2.2ALE 2 2.3CONSTRAINED OPTIONS 3 2.4CONTACT OPTIONS 3 2.5CONTROL OPTIONS 4 2.6DATABASE & OUTPUT 6 2.7DEFINE OPTIONS 7 2.8EFG 8 2.9ELEMENTS 8 2.10EOS 9 2.11IMPLICIT 10 2.12INCLUDE OPTIONS 11 2.13INITIAL CONDITIONS 11 2.14INTERFACE 12 2.15LOADS 12 2.16MATERIAL MODELS 13 2.17PERAMETER 17 2.18PERTURBATION 17 2.19RIDGEWALL 17 2.20SECTION OPTIONS 17 2.21SENSOR 18 2.22SET OPTIONS 19 2.23SPH 19 2.24TITLE 19 2.25RESTART_INPUT_DATA 19

1. INTRODUCTION LS-DYNA 971 release 4.2.1 is an enhanced and bug-fixed release built on LS-DYNA 971 release 3. This release is not being issued to clients on CD. The software can be downloaded from the Oasys Ltd website at: https://www.doczj.com/doc/3a3226012.html,/dyna. The version, revision (build) number and date of the LS-DYNA code are as follows: Version ls971 R4.2.1 Revision 53450 The revision number, precision and version type can be checked in the test box printed at the top of the .OTF and MESSAG files as per the example below. ___________________________________________________ | | | Livermore Software Technology Corporation | | | | 7374 Las Positas Road | | Livermore, CA 94551 | | Tel: (925) 449-2500 Fax: (925) 449-2507 | | https://www.doczj.com/doc/3a3226012.html, | |_________________________________________________| | | | LS-DYNA, A Program for Nonlinear Dynamic | | Analysis of Structures in Three Dimensions | | Version : ls971d R4.2.1 Date: 06/08/2009 | | Revision: 53450 Time: 07:09:25 | | | | Features enabled in this version: | | Shared Memory Parallel | | ANSYS Database format | | 32 Bit IEEE Binary File | | | | Licensed to: ATG OVE ARUP | | Issued by : arup | | | | Platform : PC WIN32 | | OS Level : Windows XP Pro SP3 B2600 | | Compiler : Intel Fortran Compiler 10.1 | | Hostname : MCCPC6CQHB4J | | Precision : Double precision (I8R8) | | Product ID : 53929 | | | | Unauthorized use infringes LSTC copyrights | |_________________________________________________|

基于单片机的交通灯控制系统

基于单片机的交通灯控制系统 一、实验目的 1、了解交通灯的控制方法 2、掌握8051单片机基本操作 3、掌握keil和PrOteuS软件的使用 二、实验原理 通过对十字路口的观察,发现红绿灯的控制原理:首先南北方向右转加直行的绿灯亮起。此时,东西方向为红灯;当右转加直行绿灯倒计时进入最后5秒, 绿灯切换为黄灯并开始闪烁,东西方向红灯不变;接着南北方向切换为左转灯,东西方向依然是红灯;同样当倒计时进入最后5秒时,黄灯开始闪烁。东西方向为红灯。然后东西方向的右转加直行绿灯亮起,以此类推。 三、实验内容及程序 主程序: void main (VOid)

Busy_LED=O; SPeCiaLLED=O; ITO=1; //INTO 负跳变触发 TMOD=O X OI;//定时器工作于方式1 TH0=(65536-50000)∕256;// 定时器赋初值TL0=(65536- 50000)%256; EA=1; //CPU开中断总允许 ET0=1;//开定时中断 EX0=1;//开外部INTO中断 TR0=1;// 启动定时 while(1) { Flag_EW_Yellow=0; //EW关黄灯显示信号 Time_EW=EW; Time_SN=SN; WhiIe(Time_SN>=5) {P仁S[0]; /∕SN 通行,EW红灯 DiSPIay();} P仁0x00; WhiIe(Time_SN>=0 ) {Flag_SN_Yellow=1; EW_Red=1; /∕SN //SN开黄灯信号位 黄灯亮,等待左拐信号,EW红灯 DiSPIay(); } Flag_SN_Yellow=0; /∕SN关黄灯显示信号Time_SN=SNL; WhiIe(Time_SN>=5) {P仁S[2];//SN左拐绿灯亮,EW红灯 DiSPIay();} P仁0x00; WhiIe(Time_SN>=0 ) {Flag_SN_YeIIow=1; EW_Red=1; /∕SN //SN开黄灯信号位 黄灯亮,等待停止信号,EW红灯 DiSPIay(); }

C51单片机的交通灯控制系统

基于C51单片机的交通灯控制系统 1、实验方案论证: 进行十字路口的交通信号灯控制电路设计,画出电路原理图及实验电路图,进行软件编程、以及使用说明文档的建立等一整套工作任务。进行十字路口的交通信号灯控制程序设计,提交一个符合上述功能要求的十字路口的交通信号灯控制系统设计。 2、控制流程分析: 对设计要求进行分析后可得出以下交通工作状态表: 3、硬件设计概要: 根据设计要求,可用6个LED灯分别模拟东西、南北的交通灯。具体接法如下:AT89C51的P1口接LED灯,P1.0、P1.1、P1.2分别接东西方向红、绿、黄交通灯,P1.3、P1.4、P1.5分别接南北方向的红、绿、黄交通灯。P1口和LED 灯之间要接限流保护电阻。两位数码管段选接P2口,位选接P0口低两位,P0口低两位接上拉电阻使其可以输出高电平。紧急情况按钮一端接地,另一端与外中断1引脚相连;恢复正常按钮一端接地,另一端与外中断0引脚相连。

三、原理图设计 1、LED显示部分电路设计: 把单片机AT89C51的P1口作为红黄绿灯显示部分,用6个LED灯分别模拟东西、南北的交通灯。P1.0、P1.1、P1.2各通过一个300Ω的限流保护电阻接东西方向的红、绿、黄LED灯;P1.3、P1.4、P1.5各通过一个300Ω的限流保护电阻接南北方向的红、绿、黄LED灯。LED灯的一端接电源,另一端经电阻接P1口,因此当P1口引脚输出低电平时LED灯发光,即此方案采取低电平驱动方式。具体电路如下: 2、紧急情况处理电路设计: 紧急情况按钮一端接地,另一端与外中断1引脚相连;恢复正常按钮一端接地,另一端与外中断0引脚相连。在程序设计时,我会将其设置为下降沿触发方式。具体电路如下:

Release Notes for C51

Release Notes for C51 8051 Development Tool Kits This file contains release notes and last minute changes that are not found in the printed manuals. Information in this file, the accompany manuals, and software is Copyright ? Keil Software, Inc and Keil Elektronik GmbH. All rights reserved. Contents 1.What's New in C51 2.Example Programs 3.Device Database? 4.Peripheral Simulation 5.Technical Support 6.Contact Details What's New in C51 The following sections list the changes instituted in each release of the C51 toolset. C51 Version 9.01 Release ?[C51 Compiler] ?Corrected: when MODDA is used and int numbers are multiplied and assigned to long, the result is potential incorrect. ?[Device Support] ?Added: debug support for Infineon XC82X devices. ?[New Supported Devices] ?Infineon XC822T-0F, XC822M-1F, XC822MT-1F, XC824MT-1F, and XC824M-1F devices. C51 Version 9.00 Release ?[μVision4]

ReleaseNote

EasyBuilder8000 V4.65.11 Build 2014.01.29 新增功能 1.工具栏新增下列两项功能: 显示公共窗口的元件:可以设定是否在一般页面显示公共窗口的内容。 显示重迭窗口的元件:可以设定是否在一般页面显示所选的重迭窗口内容。 2.[定时式资料传输]元件的最小运行时间间隔缩短为0.2秒。 3.元件[安全] 属性中的[最少按键时间(秒)] 项目新增0.1秒至0.9秒选项。 4.宏指令中的[时间间隔] 项目所使用的时间单位由"秒”更改为”100ms”,以提供更 高的执行频率。

5.在[系统参数设置] 的[HMI 属性] 设定页中新增[穿透端口] 设定功能。用户可 以依实际需要修改穿透端口的编号。 此外,也新增系统寄存器LW-9904 (穿透服务器端口号)。用户可以在HMI上实时修改端口编号。 穿透端口的编号若被变动,则在使用穿透功能前,需一并修改Project Manager中[穿透通讯] 设定页里的[HMI埠号]。这两者的设定必须保持一致,穿透功能才能正常运作。 6.Barcode/Keyboard (USB/COM)驱动程序支持USB RFID装置。

功能修正 1.提升ASCII Server驱动程序的命令回复速度,反应时间缩短为6ms。 2.避免因网络质量不稳定时,导致[定时式资料传输] 元件无法传送数据到远程 HMI。 3.修正当使用宏指令宣告浮点数(float) 数组时, 若一并赋予初始值(如下图所示), 且初始值非浮点数(例如1或2等整数),将无法正确设定初始值。

驱动程序 1.新增Siemens S7-300 (ISO Ethernet) 驱动程序。 2.修正Beckhoff Twincat 3 ADS/AMS (Ethernet), Beckhoff ADS/AMS (Ethernet) 与 Beckhoff Embedded PC驱动程序: ●可以过滤记录或警报等非必要的数据,保持通讯的畅通。 ●增加AMS Net Id 设定功能格。AMS Net ID 格式为六个字节: xxx.xxx.xxx.xxx.xxx.xxx;默认值一般为IP 地址+.1.1。 3.修正Siemens TI505 驱动程序无法读写Remote IO 所映像的XY地址。 4.修正OMRON EtherNet/IP (NJ Series) 驱动程序无法连接NJ301 系列PLC。 5.修正Mitsubishi Q00UJ/QnU/QnUD/QnUDH/QnUDEH/L (mini USB) 驱动程序,可以 过滤异常的数据,保持通讯的畅通。 6.BACnet/IP 驱动程序支持[BACnet/IP to MS/TP] Adapter 与[BACnet/IP] Server。

51单片机交通灯程序设计

单片机控制交通灯设计方案 一、单片机设计交通灯的设计要求: 状态一:南北绿灯亮,东西红灯亮,南北人行道绿灯,东西人行道红灯,南北左拐绿灯,东西左拐红灯。(时间为15S) 状态二:南北黄灯亮,东西红灯亮,南北人行道绿灯,东西人行道红灯,南北左拐绿灯,东西左拐红灯。(时间为5S) 状态三:南北红灯亮,东西绿灯亮,南北人行道红灯,东西人行道绿灯,南北左拐红灯,东西左拐绿灯。(时间为15S) 状态四:南北红灯亮,东西黄灯亮,南北人行道红灯,东西人行道绿灯,南北左拐红灯,东西左拐绿灯。(时间为5S) 二、设计原理分析 1、首先了解实际交通灯的变化情况和规律。假设一个十字路口如上图所以, 为东南西北走向。初始状态0:为东西绿灯亮,南北红灯亮;然后转状态1:东西绿灯亮黄灯亮,南北红灯亮黄灯亮;过后转状态2:东西红灯亮,南北绿灯亮;再转状态3:东西红灯亮黄灯亮,南北绿灯亮黄灯亮。一段时间后,又循环至状态0。中间可通过中断按钮产生中断,跳入中断程序执行中断。2、对于交通信号灯来说,应该有东西南北共四组灯,但由于同一道上的两组的信号灯的显示情况是相同的,所以只要用两组就行了,因此,采用单片机内部的I/O口上的P1口中的6个引脚即可来控制6个信号灯。 3、通过编写程序,实现对发光二极管的控制,来模拟交通信号灯的管理。每延时一段时间,灯的显示情况都会按交通灯的显示规律进行状态转换。 4、通过延时时间送显,可以在原有的交通信号灯系统的基础上,增添其倒计时间的显示功能,实现其功能的扩展。

5.通过脉冲中断编写中断程序,可实现中断。 三、设计的仿真图如下; 其接法为:P0接数码管的端选段, P1接数码管的位选端, P2接交通灯,接法如下: P20,P21,P22,分别接南北向的红黄绿灯, P23接南北左拐绿灯, P24,P25,P26,分别接东西向的红黄绿灯, P27接东西左拐红灯 东西人行到红绿灯和南北红绿灯接到一起 南北人行到红绿灯和东西红绿灯接到一起 四、AT89C51的KILL程序 #include "reg51.h" #define uchar unsigned char #define uint unsigned int uchar code wei[]={0x01,0x02,0x04,0x08}; //位码选择 uchar code duan[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};//段码选择 uchar table[4]={0,0,0,0};//四位为选端赋值区间

VERICUTv71_release_notes

What's NEW in VERICUT 7.1 IMPORTANT! - Licensing is NOT included in software shipments. See "How to get a license" below for details. December 29, 2010 Dear VERICUT? User: Thank you for your continued investment in VERICUT, an important part of your NC programming and machining process! The VERICUT 7.1’s NC program simulation, verification, and optimization technology is packed with new features making it more powerful and easier to use. This letter describes important changes in VERICUT 7.1. Take a moment to review what's new and improved in this release. Maintenance and Licensing Information Software maintenance keeps you on the cutting edge - CGTech provides update software to customers with current software maintenance. Your continued maintenance ensures that you have the most advanced verification technology available. If your maintenance has expired, please contact your CGTech representative (https://www.doczj.com/doc/3a3226012.html,/usa/cgtech/contact/). Sincerely, Bill Hasenjaeger CGTech Product Marketing How To Get a License - All users must complete and return the License Request Form in the CD booklet, or submit the application at https://www.doczj.com/doc/3a3226012.html,/usa/support/license/. Licensing is sent via Email only. NOTE: This software requires a VERICUT 7.1 license.

用单片机来控制交通灯

基于单片机的交通灯设计 摘要: 近年来随着科技的飞速发展,单片机的应用正在不断深入,同时带动传统控制检测技术日益更新。在实时检测和自动控制的单片机应用系统中,单片机往往作为一个核心部件来使用,仅单片机方面知识是不够的,还应根据具体硬件结构软硬件结合,加以完善。 十字路口车辆穿梭,行人熙攘,车行车道,人行人道,有条不紊。那么靠什么来实现这井然秩序呢?靠的就是交通信号灯的自动指挥系统。交通信号灯控制方式很多。本系统采用MSC-51系列单片机ATSC51和可编程并行I/O接口芯片8255A为中心器件来设计交通灯控制器,实现了能根据实际车流量通过8051芯片的P1口设置红、绿灯燃亮时间的功能;红绿灯循环点亮,倒计时剩5秒时黄灯闪烁警示(交通灯信号通过PA口输出,显示时间直接通过8255的PC口输出至双位数码管);车辆闯红灯报警;绿灯时间可检测车流量并可通过双位数码管显示。本系统实用性强、操作简单、扩展功能强。 关键词: 单片机交通灯闯红灯检测车流量 1 引言 当今,红绿灯安装在各个道口上,已经成为疏导交通车辆最常见和最有效的手段。但这一技术在19世纪就已出现了。 1858年,在英国伦敦主要街头安装了以燃煤气为光源的红,蓝两色的机械扳手式信号灯,用以指挥马车通行。这是世界上最早的交通信号灯。1868年,英国机械工程师纳伊特在伦敦威斯敏斯特区的议会大厦前的广场上,安装了世界上最早的煤气红绿灯。它由红绿两以旋转式方形玻璃提灯组成,红色表示“停止”,绿色表示“注意”。1869年1月2日,煤气灯爆炸,使警察受伤,遂被取消。 电气启动的红绿灯出现在美国,这种红绿灯由红绿黄三色圆形的投光器组成,1914年始安装于纽约市5号大街的一座高塔上。红灯亮表示“停止”,绿灯亮表示“通行”。 1918年,又出现了带控制的红绿灯和红外线红绿灯。带控制的红绿灯,一种是把压力探测器安在地下,车辆一接近红灯便变为绿灯;另一种是用扩音器来启动红绿灯,司机遇红灯时按一下嗽叭,就使红灯变为绿灯。红外线红绿灯当行人踏上对压力敏感的路面时,

51单片机交通灯设计.

摘要 交通信号灯是交通信号中的重要组成部分,是道路交通的基本语言,是为了加强道路交通管理,减少交通事故的发生,提高道路使用效率,改善交通状况的一种重要工具。适用于十字、丁字等交叉路口,由道路交通信号控制机控制,指导车辆和行人安全有序地通行。交通信号灯由红灯(表示禁止通行)、绿灯(表示允许通行)、黄灯(表示警示)组成。分为:机动车信号灯、非机动车信号灯、人行横道信号灯、车道信号灯、方向指示信号灯、闪光警告信号灯、道路与铁路平面交叉道口信号灯。近年来随着科技的飞速发展,单片机的应用正在不断深入,同时带动传统控制技术日益更新。接下来将介绍基于单片机控制的交通信号灯的自动指挥系统。交通信号灯控制方式很多。本系统采用MSC-51系列单片机80C51和芯片74LS245为中心器件来设计交通灯控制系统。、 关键字:单片机,信号灯,控制

前言 道路交通信号灯是交通安全产品中的一种类别,是为了加强道路交通管理,减少交通事故的发生,提高道路使用效率,改善交通状况的一种重要工具。适用于十字、丁字等交叉路口,由道路交通信号控制机控制,指导车辆和行人安全有序地通行。 最早的时候只有红、绿两种颜色,后来经过改良后,增加了一盏黄色的灯,红灯表示停止,黄灯表示准备,绿灯则表示通行。之所以采用这三种颜色,一方面是三原色,其他颜色也是在此基础上调出来的,另一方面,用这三种颜色作为交通讯号也和人们的视觉结构和心理反应有关。 人的视网膜含有杆状和三种锥状感光细胞,杆状细胞对黄色的光特别敏感,三种锥状细胞则分别对红光、绿光及蓝光最敏感。由于这种视觉结构,人最容易分辨红色与绿色。虽然黄色与蓝色也容易分辨,但因为眼球对蓝光敏感的感光细胞较少,所以分辨颜色,还是以红、绿色为佳。 交通信号灯是交通信号指挥中的重要组成部分,是道路交通的基本语言。交通信号灯由红灯(表示禁止通行)、绿灯(表示允许通行)、黄灯(表示警示)组成。分为:机动车信号灯、非机动车信号灯、人行横道信号灯、车道信号灯、方向指示信号灯、闪光警告信号灯、道路与铁路平面交叉道口信号灯。广泛用于公路交叉路口,弯道、桥梁等存有安全隐患的危险路段,指挥司机或行人交通,促进交通畅通,避免交通事故和意外事故发生。 图1-1.系统硬件构成模块 1.2.1功能概述 本设计由中断系统、单片机、LED数码显示模块和按键等构成。单片机是集成的IC芯片AT89C51单片机,只需根据实际选型。其他部分都需要根据应用要求和性能指标自行设计。

相关主题
文本预览
相关文档 最新文档