Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Looking for source code for 16c554 and 8051

Status
Not open for further replies.

mystery

Full Member level 2
Joined
May 9, 2001
Messages
124
Helped
4
Reputation
8
Reaction score
2
Trophy points
1,298
Location
Turkey
Activity points
825
16c554

I need sorce code written for 8051 for quad uart chip 16c554 ?
Could anyone send me ?

thanks
 

bobcat1

Advanced Member level 4
Joined
Jul 10, 2002
Messages
1,288
Helped
99
Reputation
198
Reaction score
34
Trophy points
1,328
Activity points
8,547
Hi i have written a driver for the 16c552 dual uart

Hi i have written a driver for the 16c552 dual uart in C

I think it's the same as 16c 554 bat only 2 uart

it's not compleate but its working


bobi
 

mystery

Full Member level 2
Joined
May 9, 2001
Messages
124
Helped
4
Reputation
8
Reaction score
2
Trophy points
1,298
Location
Turkey
Activity points
825
hi bobcat can you upload the code ?
 

jimi84

Newbie level 5
Joined
Jun 30, 2010
Messages
10
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,283
Activity points
1,338
I am using 16c654 can any one help me to initialize it ...
 

pradeep.c

Newbie level 1
Joined
Apr 11, 2011
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,293
Hi,

I am using NXPs' 16c554D. I have initialized it to read/write at 38400bps. But I am getting parity errors. Can anybody who has written a working piece of code, post it here.
This is my code. Clock freq is 14.7456MHz. Would appreciate if anybody lets me know what is wrong in this code. The Read and write signals are enabled in the read and write routines respectively.

WriteStrobe = 1; // Active Low signal
ReadStrobe = 1;

RstHi = 0; // Reset pin for 16c554 should be low.
PMCS = 0; // enable UART Channel D



A2 = 0;
A1 = 1; // Write to FCR,
A0 = 0;
ParallelPortWrite(0x03) ; // Fifo Enable, FIFO Reset, DMA Disabled
Nop();

A2 = 0;
A1 = 1; // Write to LCR, Even Parity, 5 bytes,Divisor Enable
A0 = 1;
ParallelPortWrite(0x98) ;
Nop();


A2 = A1 = A0 = 0;
ParallelPortWrite(0x18) ; // Write to DLL. Divide Clock Frq by 24.
Nop();

A2 = 0;
A1 = 0;
A0 = 1;
ParallelPortWrite(0x00) ; // Write to DLM
Nop();

A2 = 0;
A1 = 1; // Write to LCR, Even Parity, 5 bytes,Divisor Disable
A0 = 1;
ParallelPortWrite(0x18 ) ;
Nop();

A2 = 0; // Write to IER
A1 = 0;
A0 = 1;
ParallelPortWrite(0x00); // Disable all the interrupt

while(1)
{

LSR_Val = ReadLSR() ;
if( (LSR_Val & 0x0001) == 0x0001) // If Data is Ready, read from the RHR
{

A2 = A1 = A0 = 0; // Receive Holding Register,
Nop();
Nop();
RHRData[j++] = ParallelPortRead();
}

if (j==15)
{
j=0;

}

}
Regards
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top