Page 1 of 1
Create UDP socket EB023
Posted: Fri Apr 19, 2019 6:15 pm
by JFinlayson
Hi I am having problems creating UDP socket in flowcode 8. Program hangs at create UDP socket, Src_port hovering mouse over this say you need to numbers comma seperated, but this produces a syntax error. Putting in port address for instance 49001 is accepted. but software hangs when run on create UDP socket. Can't find any help that resolves this problem.
Also program loaded in default mode using BL0080 hangs and does not download to chip, but plugging in Pick-kit3 to ICSP port downloads software OK.
regards
Re: Create UDP socket EB023
Posted: Sun Apr 21, 2019 9:32 am
by JFinlayson
Ok checked in Flowcode 7, and same problem. I must be missing something. UDP does not care about Gateway as far as I know it does not check anything just outputs and receives on designated port as long as IP address is correct. However Processor does not hang when setting UDP port No. it seems its just waiting on a return. This happens in Flowcode 8 and Flowcode 7.
I attach Flowcode 7 UDP test prog.
Re: Create UDP socket EB023
Posted: Tue Apr 23, 2019 8:33 am
by LeighM
Hi,
It could possibly be your SPI settings that are wrong.
They don't look to match either default jumper settings on EB023
Or are you using a custom patch arrangement?
The CreateUDPSocket macro is slightly different between V7 and V8
For V7 it takes three parameters, the channel number, source port high byte, source port low byte
For V8 it takes two parameters, the channel number, the source port (as a 16 bit integer)
Regarding BL0080, does Windows detect it when connected via USB?
Does mLoader detect it?
Hope that helps
Leigh
Re: Create UDP socket EB023
Posted: Sat Apr 27, 2019 9:53 am
by JFinlayson
Sorry for delayed response been away.
Computer recognizes BL080 as soon as it is plugged into USB port as BL080 Ghost2 PIC DIL programmer. I have been using 12V supply and after awhile it stops working, its also pretty warm in workshop. It works when first started, so I will change power supply to see if it helps.
PIC16F18877 has re-mapable pins for its internal modules so this should not be a problem. I will recheck connections, maybe find something there.
Just wondered if you have problems with this device or maybe with the remap of pins.
I attached the flowcode 8 test prog.
Re: Create UDP socket EB023
Posted: Sat Apr 27, 2019 11:46 am
by JFinlayson
SDO pin not given dedicated pin in datasheet but is remapable, remped to RC5
SDI I have set on RC4 default pin
SCK I have set to RC3 default pin
CS/SS pins set to RC1
Int pin set to RC0.
As far as I can see the above should work but still hangs on setting port No.
Re: Create UDP socket EB023
Posted: Sat Apr 27, 2019 1:21 pm
by JFinlayson
Ok first problem was R10 fitted to WIZ810 which held voltage on SPI pin at 1.5V. However this did not cure the problem.
Changing chip from 16F18877 to PIC 28F2620 cured the problem. There would seem to be a problem with mapping of pins. I have enclosed prog in case it helps to find problem with PIC 16F18877.
Re: Create UDP socket EB023
Posted: Wed May 01, 2019 12:09 pm
by LeighM
Hi,
One thing worth trying with the 16F18877 is changing the SPI sample point from Middle to End.
The default for the component is Middle, which does not work on this device as I recall.
So you will need to enable the "Expose full component tree in property pane" in the View->Component Debugger dialog.
Then navigate to the properties for cal_spi and change the Sample Point to End
Hope that fixes it for you.
Leigh