help required on SC28C94 Data Transmission
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
help required on SC28C94 Data Transmission

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
Niranjan podduturi
Guest





Posted: Wed Dec 15, 2004 4:18 pm    Post subject: help required on SC28C94 Data Transmission Reply with quote

Hi,
we are working with SC28C94 for data communication.
this IC(SC28C94) we are using in polling mode
not in interrupt mode.My main aim is to trasmit
a single charecter(ie A(0x41) or B(0x42) or .....) continuously.
we are giving 8MHz clock from external.
Here iam sedning my Code

typedef unsigned long USHORT;
typedef unsigned int UINT;
typedef unsigned char UCHAR;


int main()
{
UINT *Tx;
UINT *Rd_st;
UINT *Base,*Cmd,*Aux,*Comm;

Base = (UINT *)0x10000000; /* MR0, MR1,MR2 Addr */
Comm = (UINT *)0x10000004; /* CSR Addr */
Cmd = (UINT *)0x10000008; /* CR Addr */
Aux = (UINT *)0x10000010; /* ACR Addr */

Rd_st = (UINT *)0x10000004; /* SR Addr */
Tx = (UINT *)0x1000000C; /* Tx HOLD Addr */

*Base = 0x07; /* Even parity ,8 bits/char */
*Base = 0x07; /* 1 stop bit */
*Comm = 0x0B; /*9600 bps */
*Cmd = 0x06; /* Tx Enable and Rx Disable */
*Aux = 0x00;

while(1)
{
while(((*Rd_st)&0x04)==0x00); /* check TxRdy bit =1 in SR */
*Tx = 0x43;
}
}

by using the above code , we are recieving the data but junk.
if any one knows about This Quart,please veryfy our code and if
possible suggest any modifications required to getthe exact data.

Thanking You
waiting for your response ASAP.

Niranjan Poddutur,
Sr Software Engg,
ACL,
Hyd,India.
Back to top
Anthony Marchini
Guest





Posted: Thu Dec 16, 2004 1:41 am    Post subject: Re: help required on SC28C94 Data Transmission Reply with quote

Niranjan podduturi wrote:
Quote:
Hi,
we are working with SC28C94 for data communication.
this IC(SC28C94) we are using in polling mode
not in interrupt mode.My main aim is to trasmit
a single charecter(ie A(0x41) or B(0x42) or .....) continuously.
we are giving 8MHz clock from external.
Here iam sedning my Code

typedef unsigned long USHORT;
typedef unsigned int UINT;
typedef unsigned char UCHAR;


int main()
{
UINT *Tx;
UINT *Rd_st;
UINT *Base,*Cmd,*Aux,*Comm;

Base = (UINT *)0x10000000; /* MR0, MR1,MR2 Addr */
Comm = (UINT *)0x10000004; /* CSR Addr */
Cmd = (UINT *)0x10000008; /* CR Addr */
Aux = (UINT *)0x10000010; /* ACR Addr */

Rd_st = (UINT *)0x10000004; /* SR Addr */
Tx = (UINT *)0x1000000C; /* Tx HOLD Addr */

*Base = 0x07; /* Even parity ,8 bits/char */
*Base = 0x07; /* 1 stop bit */
*Comm = 0x0B; /*9600 bps */
*Cmd = 0x06; /* Tx Enable and Rx Disable */
*Aux = 0x00;

while(1)
{
while(((*Rd_st)&0x04)==0x00); /* check TxRdy bit =1 in SR */
*Tx = 0x43;
}

When accessing the MR registers it is a good idea to reset them to the
first position before writing to them. I believe
*Cmd = 0x1a
will reset the MR pointer allowing the next two access to function properly.
At least, it works on my SCC2691
Your code will be more correct...do you really need even parity? That
seems wierd to me, but then what the heck do I know.
T.
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB