---
title: "Wiz812mj spi interface is erratic"
url: "https://maker.wiznet.io/forum/9894"
markdown_url: "https://maker.wiznet.io/forum/9894/md"
type: "Forum topic"
category: "IO Modules"
author: "WIGGUM23"
created: "2014-02-04T11:41:25+09:00"
last_activity: "2017-05-04T08:31:13+09:00"
language: "en"
views: 960
replies: 2
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Wiz812mj spi interface is erratic

## Question

Asked by WIGGUM23 on 2014-02-04 in IO Modules.

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/66ce5da9c0c2419ea44cf493870507449f344aee.jpg) 4608×3456 433 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/66ce5da9c0c2419ea44cf493870507449f344aee.jpg)

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/faa94f2a7b919ae0a5615e13cc767de736d3b82a.jpg) 4608×3456 446 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/faa94f2a7b919ae0a5615e13cc767de736d3b82a.jpg)

Hello,

I have added your WIZ812MJ Ethernet module to my existing PIC24HJ based design, to create a TCP Ethernet facility.

I gave encountered a problem with reading certain registers.

One example is in the attached photos.

I am writing 0xAA to address 0x0420 (IMG_0009) and when I read back from 0x0420 I get x08 (IMG_0010).

I can do a successful write/read cycle to many registers, but not all.

This is causing me a major problem e.g. I cannot read S0_TX_WR for buffer control.

Please help, I cannot see what I am doing wrong.

Best Regards Mike.

## Replies

### Reply 1 by wiznetmuseum, 2014-02-04

hey, Wiggum23.

i can know your problem.

WIZ812MJ Used WIZnet’s W5100 chip.

on the datasheet of W5100, address 0420-0421 can’t write.

the register must use reading.

you says “I can do a successful write/read cycle to many registers, but not all.”,

i think it is you can’t check W5100’s datasheet or register’s character.

i hope this reply is helpful to you.

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/c306b376500cd2f00025f76bcf73849b44a4d046.png) 868×485 122 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/c306b376500cd2f00025f76bcf73849b44a4d046.png)

### Reply 2 by WIGGUM23, 2014-02-05

Many thanks for your replies,

I made a simple mistake.

I still couldn’t write/read to 0x0424 ( S0_TX_WR ) then I found this on another forum :-

“Looks like the Sn_TX_WR only gets updated AFTER a successful SEND! You’ll have to keep track of all the writes to the TX buffer and write the TOTAL bytes to send in the Sn_TX_WR register, perform the Send and then Sn_TX_WR can be read and will have the updated value in it.”

I am now getting good results but I think this should be added to the datasheet as soon as possible.

Best Regards Mike.

---

Source: https://maker.wiznet.io/forum/9894
