Jallist Archive Jul 2004

Re: JAL ethernet 3C509B

From: "bvwelch" <bvwelch(at)hotmail.com>
Date: 07 Jul 2004 14:01:18 -0000

Mike,

About the I/O register "windows". What 3com calls "windows", 
National and RealTek call "pages".  The idea is, they do not want to 
consume too much of the PC's I/O "footprint", so they break up their 
register into sets of pages/windows.  

Just be careful and you should be OK.

Once you get ARP and PING going with JAL ethernet, we can work 
something out about TCP.  Right now, I leverage some ne2000-specific 
features, to deal with retransmission of packets. We will have to 
work out some other mechanism for the 3C509B.

I also store some "offline context" info in ne2000-specific manner. 
But this could be handled differently, without much re-work.

While you are getting ARP and PING going, I will look at the 3C509B 
datasheet more closely.

William

--- In jallist@yahoogroups.com, "mikerey35475"  wrote:
> William and Eur,
> 
> I have added a 3Com509B folder to my section of the files area,
> mikerey35475. I have placed the ASM listings from both websites I 
> found using a PIC and this NIC, as well as the schematics from 
both 
> sites. One is the 16F877 & 3Com509B, the other is 18F452 & 
3Com509B. 
> There is also a f877&3c509b_notes file placed in that folder. It 
> lists discrepancies in the ASM listing vs the schematic, the 
> schematic is correct (I assume, since this is how I have it wired 
and 
> it works). Reading thru both ASM listings, it appears that address 
> line a9 is only toggled during the initialization of the NIC, as 
> shown in these two places:
> 
> **** Note that these listings reference a10, but should be a9 ****
> 
> send_id_seq
> 	bcf	a10  ** a9 **
> 	bcf	a0
> 	bcf	a1
> 	bcf	a2
> 	bcf	a3
> 	movlw	0x00
> 	call	OutByte
> 	movlw	0x00
> 	call	OutByte
> 	movlw	0xff
> 	movwf	CC
> 	movlw	0xff
> 	movwf	reg_al
> seq1
> 	movf	reg_al,W
> 	call	OutByte
> 	bcf	STATUS,C
> 	rlf	reg_al,f
> 	bnc	seq2
> 	movlw	0xcf
> 	xorwf	reg_al,f
> seq2
> 	decfsz	CC,f
> 	goto	seq1
> 	return
> 
> |
> |  unrelated source code omitted
> |
> 
> activate_adapter
> 	movlw	0xf0
> 	call	OutByte
>  	bsf	a10   ** a9 **
> 	call	enable_adapter
> 	call	rx_reset
> 	call	tx_reset
> 	call	set_rx_filter
> 	call	set_window_2
> 	call	set_stored_mac
> 	call	set_window_4
> 	call	set_link_jabber
> 	call	rx_enable
> 	call	tx_enable
> 	call	set_window_1
> 	return
> 
> 
> I am still reading the 3C509 datasheet to better understand what 
this 
> code is doing. Having a hard time with these windows (ie window 1, 
> etc.) As Forrest Gump would say, "I'm not a smart man, but I know 
> what love is."
> 
> Mike



Seiz System Engineering AbelCam AbelCam WebCam Software for Windows