MCBX51: PAL Equation Update for Devices
Information in this article applies to:
QUESTION
I'm using the MCBx51 Evaluation Board with a Philips 87C51.
Everything seems to work OK except when I try to write to Port 1 and
I clear P1.7, I lose the connection with my target, and the debugger
emits the message:
Please reset your target system and
select try again to resynchronize.
I have the A17 DIP switch in the OFF position, so I should be able
to clear P1.7.
Do you have any suggestions?
ANSWER
This is a known problem with the PAL equations for the MCBx51
Evaluation Board.
;PALASM Design Description
;---------------------------------- Declaration Segment ------------
TITLE GAL for MCB251SB Prototype board
PATTERN Decoder and Boot Logic
REVISION 1.1
AUTHOR Hans Schneebauer
COMPANY Keil Elektonik GmbH
DATE 10/06/96
CHIP IC6 PALCE20V8
;---------------------------------- PIN Declarations ---------------
PIN 1 LED COMBINATORIAL ; INPUT
PIN 2 RST COMBINATORIAL ; INPUT
PIN 3 /PSEN COMBINATORIAL ; INPUT
PIN 4..11 A[10..17] COMBINATORIAL ; INPUT
PIN 12 GND ; INPUT
PIN 13 /MAP[0] COMBINATORIAL ; INPUT
PIN 14 /MON_ON COMBINATORIAL ; INPUT
PIN 15 /RD_RAM COMBINATORIAL ; OUTPUT
PIN 16 MON_RUN COMBINATORIAL ; OUTPUT
PIN 17 /CS_USER COMBINATORIAL ; OUTPUT
PIN 18 A16_ROM COMBINATORIAL ; OUTPUT
PIN 19 A16_RAM COMBINATORIAL ; OUTPUT
PIN 20 /CS_UART COMBINATORIAL ; OUTPUT
PIN 21 /CS_ROM COMBINATORIAL ; OUTPUT
PIN 22 CS_RAM COMBINATORIAL ; OUTPUT
PIN 23 /MAP[1] COMBINATORIAL ; INPUT
PIN 24 VCC ; INPUT
;----------------------------------- Boolean Equation Segment ------
EQUATIONS
IF (MON_ON) THEN ; Monitor switched on
BEGIN
A16_ROM = LED
IF (MAP[1..0] = #b11) THEN
BEGIN
RD_RAM = PSEN + /A[16] ; 8051 Mode
A16_RAM = 0;
END
ELSE
BEGIN
RD_RAM = PSEN
A16_RAM = A[16]
END
IF (MON_RUN) THEN
BEGIN
MON_RUN = /RST
IF (MAP[1..0] = #b11) THEN ; 8051 Mode ?
BEGIN
CS_RAM = /(A[15] * A[14] * A[13]) ; Address 0 - dfff
; CS_ROM = A[15] * A[14] * A[13] * /A[12] * A[11] + ; Address e800 - efff
; A[15] * A[14] * A[13] * A[12] ; Address 3f000 - 3ffff
CS_ROM = /CS_RAM * /CS_UART * /CS_USER ; Address e800 - efff
END
ELSE
BEGIN
CS_RAM = /(A[17] * A[16] * A[15] * A[14] * A[13]) ; Address 0 - 3dfff
; CS_ROM = A[17] * A[16] * A[15] * A[14] * ; Address 3e800 - 3efff
; A[13] * /A[12] * A[11] +
; A[17] * A[16] * A[15] * A[14] * ; Address 3f000 - 3ffff
; A[13] * A[12]
CS_ROM = /CS_RAM * /CS_UART * /CS_USER ; Address 3e800 - 3efff
END
END
ELSE
BEGIN
CS_ROM = 1 ; ROM always enabled
CS_RAM = 0 ; RAM always disabled
IF (A[17..10] = #b11111010) THEN ; Address 3e800 - 3ebff
BEGIN
MON_RUN = PSEN * /RST
END
ELSE
BEGIN
MON_RUN = 0
END
END
END
ELSE ; Monitor switched off
BEGIN
CASE (MAP[1..0])
BEGIN
0: BEGIN
CS_RAM =/(A[17] * A[16]) ; RAM 00000 - 2ffff
CS_ROM = A[17] * A[16] * /CS_UART * /CS_USER ; ROM 30000 - 3dfff
A16_ROM = A[16]
A16_RAM = A[16]
RD_RAM = PSEN
END
1: BEGIN
CS_RAM = /A[17] ; RAM 00000 - 1ffff
CS_ROM = A[17] * /CS_UART * /CS_USER ; ROM 20000 - 3dfff
A16_ROM = A[16]
A16_RAM = A[16]
RD_RAM = PSEN
END
2: BEGIN
CS_RAM = /A[17] * /A[16] * /A[15] ; RAM 0000 - 07FFF
CS_ROM = /CS_RAM * /CS_UART * /CS_USER ; ROM 08000 - 3dfff
A16_ROM = A[16] ; ROM 3e800 - 3ffff
A16_RAM = A[16]
RD_RAM = PSEN
END
3: BEGIN ; 8051 Mode
CS_RAM = /(A[15] * A[14] * A[13]) ; RAM 00000 - 0dfff 8051 Mode
CS_ROM = 1; ; ROM 00000 - 0ffff
A16_ROM = 0
A16_RAM = 0
RD_RAM = /A[16]
END
END
END
IF (MAP[1..0] = #b11) THEN ; 8051 Mode?
BEGIN
IF (A[15..10] = #b111000) THEN ; ADDRESS e000 - e3ff
BEGIN
CS_USER = 1
END
ELSE
BEGIN
CS_USER = 0
END
IF (A[15..10] = #b111001) THEN ; ADDRESS e400 - e7ff
BEGIN
CS_UART = 1
END
ELSE
BEGIN
CS_UART = 0
END
END
ELSE
BEGIN
IF (A[17..10] = #b11111000) THEN ; ADDRESS 3e000 - 3e3ff
BEGIN
CS_USER = 1
END
ELSE
BEGIN
CS_USER = 0
END
IF (A[17..10] = #b11111001) THEN ; ADDRESS 3e400 - 3e7ff
BEGIN
CS_UART = 1
END
ELSE
BEGIN
CS_UART = 0
END
END
;-------------------------------------------------------------------
See below for the PAL file as well as a JEDEC file to reprogram
the device.
ATTACHED FILES
Request the
files attached
to this knowledgebase article.
Last Reviewed: Thursday, February 25, 2021