DigitalBob wrote: »
Guy's I've tested your work and I don't have any problems, everything looks good. The OP needs some training on the basics, and maybe Windows 101. Is what it is.
bbrien wrote: »
Everything aside you never did tell me about the10MHz crystal and what to do about the difference in crystals I will retry the units again tomorrow using a baud of 115200. also about the pcf8574 unit.
Publison wrote: »
All ZIP files are being blocked by Chrome. I just tried the new Microsoft Edge and downloads are fine. Firefox may work also.
Dave Hein wrote: »
Can other people try downloading the zip file I posted. I can download it with either Edge or Chrome. However, I can't download the zip file in the SpinEdit thread with Chrome, but I can with Edge. I wonder if it depends on how the zip file is created. I used the Windows file manager to create my zip file.
ser : "cserial"
PUB recvSerialData | val1, val2, val3, val4
val1 := ser.rx1(fd)
val2 := ser.rx1(fd)
val3 := ser.rx1(fd)
val4 := ser.rx1(fd)
c.printf4(string("recvd1: %d, recvd2: %d, recvd3: %d, recvd4: %d\n\n"), val1, val2, val3, val4)
I don't think he wants it working otherwise he would acknowledge us and do as we say and also accept that the problem is not hardware or software, the problem is elsewhere. He is quite good though at making something that works, not work (not in a happy way though)
I said it will work and bob says it does work, but in general I notice that you always seem reluctant to try stuff and rather poke around under the hood to find a "problem". Many of us have already said that there is no real reason why you shouldn't have had it working a long time ago already. When the recipe says "add eggs" you just add eggs, but you have to crack them first and they don't tell you how to crack them either, you should know that already.
The debug terminal is set for 115200 baud. scope1master.spin assumes a 5 MHz crystal, but you can change this to match your crystal frequency.
I think this bounty program is causing far more grief than without it. I mean every snake hole is being served up to the crooks on a plate.
The calls to fdserial are sending raw binary numbers to pin one. Is that what you want, or did you want ASCII characters? How are you receiving the data from pin 1, and how do you display it?
I have been able to download both ZIP and your individual Spin files fine, now, using regular Chrome on Windows.
However earlier in the day Chrome was issuing warnings on the same kind of files on this same site. I took screenshots and sent them on to Jeff and Jeff forwarded to Publison too I think.
So looks like something has recently relaxed (which is good news, at least for now).
One note of caution on your implementation. Since your serial receiver is normally on a different device, you might miss a byte on the receive side, and be out of sync with the transmitter side. You may want to send a fifth byte that is a synchronization code, so that you can ensure that the bytes are received in the correct order. The synchronization code needs to be a value that you wouldn't normally see in the rest of the data. Maybe a value of $aa, or something like that.
Another issue is that the receiver will hang waiting for a byte if the transmitter isn't sending. To avoid this, you could use rxtime1(handle, ms) to set a time limit on the number of milli-seconds it will wait to receive a byte. If the time expires it will return a value of -1.
I don't understand why you are using FullDuplexSerial. The code I posted already provide this functionality. I'll rewrite you're latest code to do what I think you are trying to do. It may be an hour or so before I can get to it.
I don't think there's any reason to use a separate cog for the sendSerialData/debug routine. Just call it from the cog 0. The serial drivers are already running in their own cogs, and they are using transmit and receive buffers of 64 bytes. Why are you trying to change to FullDuplexSerial and FullDuplexSerialPlus. Just use the serial driver provided by clib. This is located in cserial.spin if you want to look at it.
Tell me exactly what you want to do, and I'll help you get there.