6502.org
http://forum.6502.org/

[116] 6502 - 8251
http://forum.6502.org/viewtopic.php?f=7&t=371
Page 1 of 1

Author:  8BIT [ Fri Jun 01, 2001 12:24 pm ]
Post subject:  [116.1] 6502 - 8251

I copied this from the PCB discussion to the General Discussion as more people may be able to use it. The new title will make it easier to find.

>From AIRUL
>I trying to integrate 8251 into 6502 based system, but not working.I >hope you can give me an idea or schematic view and simple test

>program to test 8251 in system based on 6502.

AIRUL,

I have not worked with the 8251 but am willing to help.
Do you have a web site address containing the technical specs on the 8251?

Do you have a schematic of your system? If so, can you put it on a web site so we can all look at it and help with a solution?
Also, any software that you have tried would help too.

In the mean time, I'll try to dig up the specs on my own and see what I can do. :)

Daryl (65c02@altavista.com)

Author:  8BIT [ Tue Jun 05, 2001 12:19 am ]
Post subject:  [116.2] 6502 - 8251

So far, all I've found that might help is an article about the 8251 used with the Z-80 CPU. It mentions an initialization bug.
If anyone else can offer up any help, please do. I was able to get the pinout and register description from the "chip directory" but could not find any other technical data.

Here's the article:

In article copeland@metronet.com (Charles Copeland) writes:

I used a 8251 about ten years ago. There is/was a bug about initializing the chip. The data book I had at the time didn't mention it.

Yes, they've eliminated the references to this problem, which is why I've kept my '82 _Component Data Catalog_ all these years.

I vaguely remember something about writing 0 out twice to some

port to get to kick in.

Here what has always worked for me, in Z80 assembler:

CON_REG EQU ???? ; CONTROL REGISTER I/O PORT ADDRESS

RST_CMD EQU 40H ; 8251 RESET COMMAND

MODE EQU 5EH ; 8251 MODE CONSTANT (CLK X 16, 8 DATA BITS,

; ODD PARITY ENABLED, 1 STOP BIT)

RST_ERR EQU 15H ; 8251 RESET ERROR FLAG COMMAND

INIT_UART:

XOR A ; LOAD NULL

OUT (CON_REG),A ; SEND NULL TO 8251

NOP ; DELAY

OUT (CON_REG),A ; SEND ANOTHER NULL

NOP ; DELAY

OUT (CON_REG),A ; SEND ANOTHER NULL

NOP ; 8251 NOW IN COMMAND MODE

LD A,RST_CMD ; LOAD RESET COMMAND

OUT (CON_REG),A ; RESET 8251

NOP ; DELAY

LD A,MODE ; LOAD 8251 MODE CONSTANT

OUT (CON_REG),A ; SET 8251 MODES

NOP ; DELAY

LD A,RST_ERR ; LOAD RESET ERROR FLAGS COMMAND

OUT (CON_REG),A ; RESET AND ENABLE 8251

--

=====================================================================

Michael Kesti | "And like, one and one don't make

Grass Valley Group | two, one and one make one."

mrk@gvgdsd.GVG.TEK.COM | - The Who, Bargain

Hope this helps!

Daryl (65c02@altavista.com)

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/