CS8900a problems (very long post)

Currently, I am trying to interface the a cs8900a to the motorola 6812 microcontroller. A desecription and schematic of the board I am using can be found at

formatting link
Additionally, I have been using the cs8900a in 8 bit mode (or trying to). I am able to read from registers or any place in internal memory using the packetpage pointer and packetpage data registers (i.e. I can read the product ID register). My main problem is that I I am unable to transmit any packets. I am connecting my ethernet module to my pc via a crossover cable. On my pc, I have an ethereal packet sniffer running to see if I was able to send anything. Right now I am able to get a bid for transmit (the RDY4txNow bit goes high) but it will not transmit anything. Also when I put the while loop in for the repeated transmit, the cs8900a will not reset and the link light will not come on. If I comment out the while loop, the reset light does come on but it still does transmit anything. I think it either may be compiler problems or timing issues. How long must I wait after I reset to start transmitting anything? I've looked in cirrus's 8-bit application note for transmitting and I've read the data sheet for transmitting many times (section 5.7). Im really stumped so any help will be appreciated.

Motorola ports - IET 8900a pins

PORTT[7:0] - AD[7:0] PORTJ[7:4] - D[3:0] PORTJ[0] - AEN PORTJ[1] - IOR PORTJ[2] - IOW

#include "HC12.h" //port maps

#define PPPtr 0x0a //address of packet page pointer #define PPData 0x0c //address of packet page data register #define RxTxData 0x00 // Receive/Transmit data (port 0) #define RxTxData1 0x02 // Receive/Transmit data (port 1) #define TxCmd 0x04 // Transmit Command #define TxLength 0x06 // Transmit Length #define ISQ 0x08 // Interrupt status queue #define bkpt asm("bgnd");

//waits a time/4 ms void mswait(unsigned short time){

for(;time>0;time--){

TC5=TCNT+2000; // wait

TFLG1 = 0x20; // clear C5F

while((TFLG1&0x20)==0){}; } }

void TimerInit(void){

COPCTL = 0x00; // disable COP TIOS |= 0x20; // enable OC5 TSCR =0x80; // TEN(enable)

}

//changing the wait periods does not change the final data output unsigned char IOread (unsigned char address) { unsigned char data; DDRT = 0x00; //set port t as input PORTJ = ((address

Reply to
Kiran Vinta
Loading thread data ...

To see if there are compiler problems, look at the code generated by your compiler and see if it matches what you intended. Most compilers can produce combined assembly/C listings. Some debuggers also provide this.

Try section 3.3 of the datasheet - "Reset and Initialization".

Another helpful document might be the CS8900a FAQ at Cirrus Logic's website.

Reply to
Gary Kato

I have looked at those documents but they still do not help me very much.

Reply to
Kiran Vinta

Kiran,

Adam Dunkels uIP package supports the CS8900a. Check out his source code.

formatting link

It is written in C with some embedded 6502 assembler.

Perhaps that might be helpful to you.

Glenn

Reply to
Glenn Jones

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.