Maker Pro
Maker Pro

Looking for UART driver !!!

T

TerryChan

Jan 1, 1970
0
I am doing a project with MCU,8051 and UART,SCC2691(Philips)
but i can't initialize it properly,
therefore i am looking for the driver for it

i just want the MCU to receive serial data from the SCC2691
and the baud rate is 4800
oscillator is 3.686MHz


Thank you very much
 
G

Glenn Gundlach

Jan 1, 1970
0
I am doing a project with MCU,8051 and UART,SCC2691(Philips)
but i can't initialize it properly,
therefore i am looking for the driver for it

i just want the MCU to receive serial data from the SCC2691
and the baud rate is 4800
oscillator is 3.686MHz


Thank you very much

I must be feeling cranky because I looked at the Philips data sheet, I
know MCS51 assembly and came to a simple conclusion. Write it like
everyone else. Since we don't know your specific hardware addressing,
you just can't take a piece of code and use it directly unless you're
incredibly lucky. The UART looks pretty simple to use. Load the
registers, read the registers. Shouldn't take more than an hour or
two. Of course if the harware is wrong....
GG
 
R

Rich Grise

Jan 1, 1970
0
This is essentially useless, unless you give us some idea what you're trying
to do with your software.

You _do_ know that these things need to be programmed, don't you?

With what you've given, Glenn Gundlach's answer is the best you're going
to get.

Read the data sheet
Figure out what you want to do
Read the data sheet
Figure out how to do what you want to do
Read the data sheet
Write the program that inputs and outputs the appropriate bytes.

That's pretty much it.

Good Luck,
Rich

TerryChan said:
Thank you for your reply but i do tried for a long time.
and here is the circuit diagram
http://www.ee.cuhk.edu.hk/~s017281/uart.gif
can anyone help me ?
19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
 
G

Glenn Gundlach

Jan 1, 1970
0
Thank you for your reply but i do tried for a long time.
and here is the circuit diagram
http://www.ee.cuhk.edu.hk/~s017281/uart.gif
can anyone help me ?

I think you would have an easier time if you added the address/data
bus demultiplexer so that you could put A0..2 directly into the memory
map though it could work as you have it but it requires extra software
and execution time. I would write to P0 and P3 byte wide rather than
trying to set/clear the individual bits or is that not possible since
P3 also has the serial in and out data? If it were mine, I'd move
a0..2 to the P0 port so I could write byte wide. Pay close attention
to the interface to the UART to make certain the 'control' bits
(a0..2,rdn,wrn) are happening at the right time.

Is CEN tied to ground? The schematic doesn't show a junction where
ground crosses the CEN/resistor wire. Since it isn't a 'T' junction, I
assume it isn't tied even though it should be.

The system is further complicated in that you need to poll the UART to
find out if it needs attention. It would be much simpler to use
interrupts so the hardware does a little of the work for you rather
than having to write polling software (always a pain).

Keeping the address bits in order would be nice also so that it
increments in the same sequence as the P3 port.

I don't see a capacitor on the reset line of either the processor or
the UART. Are you certain they are in fact reset?

I added a code fragment of the serial interrupt for 8051 for a project
of mine from many years ago. You'll need to define the memory
locations of HEADOUT, TAILOUT and the like but it does work correctly
though it had 2k of external RAM for the input and output queues.


;**************************************************************
;* Serial Interrupt *
;**************************************************************

ORG $0023 ;hardware address of serial port
interrupt
JMP SERINT ;

other code
 
Top