Could someone kindly point me in the direction of the acceptable example for the W5100
that sets the MODE REGISTER to INDIRECT MODE, AUTO ADRESS — Then READS the mode register. I cant seem to get this to work. Neither of them - Do BOTH these work?
Using Wiz812MJ dev board.
So far I’ve tried
W5100 starts off UNPOWERED. All address lines on WIZ are grounded except ADDR0 and ADDR1.
- Power up micro
- After micro starts up correctly I drive low
– the WIZ SCS pin (I DISABLE SPI)
– the WIZ RESET LINE - Micro powers J1 pin 12 of WIZ812MJ on. Waits half second
- Micro powers J2 pin 1 of WIZ812MJ on. Waits half second
- Drive the 3 HANDSHAKE Lines CS / WR / RD HIGH.
- Drive the RESET line HIGH (Releases RESET to let WIZ operate) Waits half second
---- RESET ALL REGISTERS ----
- Put value of 0 on both ADDR lines (DIRECT ADDRESS IS 0x0000)
- Put value of 0x80 on DATA LINES. Wait 150nS.
- Drive CS line LOW. Wait 150nS
- Drive WR line LOW. Hold 250nS
- Drive WR line HIGH. Wait 150nS
- Drive CS line HiGH. Wait 30mS (Presumably I just cleared all registers to default states)
---- SET INDIRECT and AUTO ADDRESS INCREMENT MODEs by “DIRECT ADDRESSING”----
- Put value of 0 on both ADDR lines (DIRECT ADDRESS IS 0x0000)
- Put value of 0x03 on DATA LINES
- Drive CS line LOW. Wait 150nS
- Drive WR line LOW. Hold 250nS
- Drive WR line HIGH. Wait 150nS
- Drive CS line HiGH. Wait 1mS
(Presumably I just loaded the MODE REG with correct data. I’d like to READ THAT BACK! INDIRECTLY)
So ---------- Then to READ ------
---- Attempt to READ MODE REGISTER INDIRECTLY ----
Yeah… Hmmmmmm… Seems you have 2 choices here.
AS one might assume — Choice # 1 The Real McCoy “INDIRECT” METHOD
( by manual Rev 1.2.7 page 61 )
- Put value of 0 on both ADDR lines (Yeeessss weird I know. Same as DIRECT ADDRESS 0x0000)
OH! ----- Wait 150nS - Drive CS line LOW. Wait 150nS
- Drive RD line LOW. Wait 100nS (at least 48 right?)
- SAVE DATA that appears
- Drive RD line HIGH. Wait 150nS
- Drive CS line HiGH. Do whatever but certainly –
- Marvel at your data - if you got any .
OR as some OTHERS might assume ---- Choice #2. The OTHER Real McCoy Indirect Method (???)
- Put value of 0x01 on ADDR0 and ADDR1 lines (IDM_ADR0 MSB ADDRESS)
- Put value of 0x00 on DATA LINES
- Drive CS line LOW. Wait 150nS
- Drive WR line LOW. Hold 250nS
- Drive WR line HIGH. Wait 150nS
- Drive CS line HiGH. Wait 100nS
- Put value of 0x02 on ADDR0 and ADDR1 lines (IDM_ADR1 LSB ADDRESS)
- Put value of 0x00 on DATA LINES
- Drive CS line LOW. Wait 150nS
- Drive WR line LOW. Hold 250nS
- Drive WR line HIGH. Wait 150nS
- Drive CS line HiGH. Wait 100nS
- Put value of 0x03 on ADDR0 and ADDR1 lines (IDM_DR Addr)
- Drive CS line LOW. Wait 150nS
- Drive RD line LOW. Wait 100nS (at least 48 right?)
- SAVE DATA that appears
- Drive RD line HIGH. Wait 150nS
- Drive CS line HiGH.
19,. Marvel at your data. Which I ---- er - umm “OTHERS” never see anything but “0”'s
Guessing second approach doesn’t work. Right?
Thanks for any time for a reply