导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→RTL8019问题[lwen1999]

 *第44458篇: RTL8019问题

  
楼 主:lwen1999 2006年11月16日09:52
 RTL8019问题
现在要用8019来做TCP/IP通信,板回来后发现8019不能工作。
我的IO地址选的是240H的。85脚接地,84脚接VDD,82脚接VDD,81接地。
现在我接上仿真机试着写CR,但读出来的值不对不知道怎么回来我用的是ZLIP的协议哪位做过请教下附上原理图。我的MAIL是:LWEN1999@163.COM
点击浏览该文件


  
2楼:lwen1999 2006年11月16日20:24
 怎么没人肯帮忙?郁闷啊.
都没人肯帮忙?一开始是晶振不起振,但现在起振了还是不行.往CR里写了个0X21,读出来是00.真是怪.
  
3楼:lwen1999 2006年11月18日10:23
 寄存器已经能正常控制但8019还不能正常工作
寄存器的问题已经解决但初始化后收不到网络信号。还不能正常工作。int dly; 

 REG00=0x21;    // Stop RTL8019 before initiation.

    for(dly = 50000; dly >   0; dly--);;;  //  The delay time will be replaced by OSTimeDly().
    
 EthPageSel(0);

    REG01 = 0x4C;        // Page Start Register. The Page Start register sets the start page address of
                         // the receive buffer ring.
 REG02 = 0x60;        // Page Stop Register. The Page Stop register sets the stop page address of the 
                      // receive buffer ring.  In 8 bit mode the PSTOP register should not exceed to 0x60, 
       // in 16 bit mode the PSTOP register should not exceed to 0x80.
 REG03 = 0x4C;//5F;  // Boundary Register (03H; Type=R/W in Page0)
                         // This register is used to prevent overwrite of the receive buffer ring. It is 
       // typically used as a pointer indicating the last receive buffer page the host has read.
 REG04 = 0x40;        // Transmit Page Start Register (04H; Type=W in Page0)
                         // This register sets the start page address of the packet to the transmitted.
 REG07 = 0xFF;      // ISR: Interrupt Status Register (07H; Type=R/W in Page0)
                         // This register reflects the NIC status. The host reads it to determine the cause of
       // an interrupt.Individual bits are cleared by writing a "1" into the corresponding bit. 
       // It must be cleared after power up.
 REG0A = 0x00;
 REG0B = 0x00;        // These two registers set the data byte counts of remote DMA.
                         // to debug the connection freely, the NIC is configed as receiving any data from MAC.
    REG0C = 0xC4;      // RCR: Receive Configuration Register (0CH; Type=W in Page0, Type=R in Page2)   

 REG0D = 0xE0;        // TCR: Transmit Configuration Register (0DH; Type=W in Page0, Type=R in Page2)
 REG0E = 0xC8;   // DCR: Data Configuration Register (0EH; Type=W in Page0, Type=R in Page2)
 REG0F = 0x00;   // IMR: Interrupt Mask Register (0FH; Type=W in Page0, Type=R in Page2)
                         // All bits correspond to the bits in the ISR register. POWER UP=all 0s. Setting individual
                         // bits will enable the corresponding interrupts.

    EthPageSel(1);
 REG07 = 0x4D;//4C;  // CURR: Current Page Register (07H; Type=R/W in Page1)
                         // This register points to the page address of the first receive buffer page to be used 
          // for a packet reception.
 REG08 = 0x00;      // MAR0-7: Multicast Address Register (08H - 0FH; Type=R/W in Page1)
                         // These REGisters provide filtering bits of multicast addresses hashed by the CRC logic.
 REG09 = 0x00;
 REG0A = 0x00;
 REG0B = 0x00; 
 REG0C = 0x00;
 REG0D = 0x00;
 REG0E = 0x00;
 REG0F = 0x00;

    EthCardAddrLoad();     // 将网卡地址写入到mar寄存器  
   
    EthPageSel(0);
 REG0C = 0xCC;   //将网卡设置成正常的模式,跟外部网络连接
 REG0D = 0xE0;
 REG00 = 0x22;   // start RTL8019.
 REG07 = 0xFF;    //清除所有中断标志位
 REG0F = 0xFF;


>>>>>>对该主题发表你的看法

本主题贴数3,分页: [第1页]


[上一篇主题]:8019请教

[下一篇主题]:[求助]学习型遥控器的芯片设计和存储器选择