-
Notifications
You must be signed in to change notification settings - Fork 6
W5100 Hardware Detection
Oliver Schmidt edited this page Apr 22, 2022
·
4 revisions
The W5100 doesn't come with any signature bytes and/or version info. And the device utilising the W5100 doesn't necessarily have a ROM or other means to detect its presence. Therefore it is necessary to read some configuration parameter from the W5100 and compare it to a well known value.
I have chosen to use the Retry Time-value Register
at 0x0017
for that purpose. The reasons are that I don't see any reason to ever change the default value and that the default value of 0x07D0
is specific enough to not be read from some other hardware happening to be accessed by trying to read from the W5100.
lda w5100+0
ora #$03
sta w5100+0
lda #$00
sta w5100+1
lda #$17
sta w5100+2
lda #$07^$D0
eor w5100+3
eor w5100+3
beq found
Content on this wiki is licensed under the following license: CC Attribution 3.0 Unported