??? 06/13/06 09:13 Read: times |
#118204 - code sample. Responding to: ???'s previous message |
//******************************************************************
//* RAM Definitions //****************************************************************** idata unsigned char flags,last_line,sending,TTL,Connected; idata unsigned char byte_read,data_H,data_L,byte_read2; idata unsigned char high_nibble, low_nibble, high_char, low_char,resend; idata unsigned int i,txlen,rxlen,chksum16,hdrlen,tcplen,tcpdatalen_in,dhcpoptlen; idata unsigned int tcpdatalen_out,ISN,portaddr,ip_packet_len; idata unsigned long hdr_chksum,my_seqnum,client_seqnum,incoming_ack,expected_ack; ...... txlen = 256 ;//ip_packet_len + 14; //if(txlen < 64) // txlen = 64; data_L = make8(txlen,0); data_H = make8(txlen,1); write_rtl(CR,0x22); write_rtl(TPSR,txstart); write_rtl(RSAR0,0x00); write_rtl(RSAR1,0x40); write_rtl(ISR,0xFF); write_rtl(RBCR0,data_L); write_rtl(RBCR1,data_H); write_rtl(CR,0x12); for(i=0;i<txlen;++i) write_rtl(RDMAPORT,packet[enetpacketDest0+i]); byte_read = 0; while(!(byte_read & RDC)) read_rtl(ISR); write_rtl(TBCR0,data_L); write_rtl(TBCR1,data_H); write_rtl(CR,0x24); byte_read = 0; while(!(byte_read & PTX)) read_rtl(ISR); this works. But If I go higher on txlen I have problems. excuse the messy code... |
Topic | Author | Date |
PacketWacker Transmit size limition. | 01/01/70 00:00 | |
byte? | 01/01/70 00:00 | |
datasheet | 01/01/70 00:00 | |
oops | 01/01/70 00:00 | |
Horse's mouth | 01/01/70 00:00 | |
Semantics | 01/01/70 00:00 | |
number of bytes, not width of data | 01/01/70 00:00 | |
RBCR0,1 | 01/01/70 00:00 | |
Clear IMR? | 01/01/70 00:00 | |
code sample. | 01/01/70 00:00 | |
Your Code | 01/01/70 00:00 | |
Make8 | 01/01/70 00:00 | |
I works know.![]() | 01/01/70 00:00 |