WIZ850io TCP Server data sending mistake
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: WIZ850io TCP Server data sending mistake
by irina WIZnet ·
Do you use the iolibrary- driver we provide?
VDM mean that data Length is controlled by SCSn.
Do you control the SCSn for data length?
RE: RE: WIZ850io TCP Server data sending mistake
by HPMaster82 ·
Hello Irina,
Yes, the SCSn pin is controlled by me, because on the bus I handle some port extender chips too.
The language what I use is the LunaAVR, so I had to write the routines for myself.
Here is the write routuine, as I handle the sending:
Procedure WriteStr(SendData as string, sid as byte)
// The ‘sid’ is the Socket ID
dim length, i as word
dim TX_RDptr, TX_WRptr as word
dim status as byte
length = len(SendData) // The length of the send data string
status = readSnSR(sid)
TX_RDptr = readSnTX_RD( sid )
TX_WRptr = getTXWR_VirtualAddress( sid )
CSACTIVE // Go to SCSn pin to LOW state
Spi.Master.WriteByte TX_WRptr.highbyte
Spi.Master.WriteByte TX_WRptr.lowbyte
ControlByte = (sid << 5) or 0x14
Spi.Master.WriteByte ControlByte
for i = 1 to length
Spi.Master.WriteByte ( SendData.bytevalue(i) )
next
CSPASSIVE // Go SCSn pin to HIGH state
TX_WRptr = TX_RDptr + length
writeSnTX_WR(TX_WRptr, sid)
writeSnCR(SnCR_SEND, sid)
endproc
In my opinion, this routine should works well, so the mistake can be in an other routine or I set a register wrong. Can it be possible?
All characters of the SendData will be send, just in a one-character length packet…