Create UDP socket EB023

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
JFinlayson
Posts: 93
Joined: Mon Sep 23, 2013 4:33 pm
Has thanked: 5 times
Been thanked: 6 times

Create UDP socket EB023

Post 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
The older the boy the bigger the toy

JFinlayson
Posts: 93
Joined: Mon Sep 23, 2013 4:33 pm
Has thanked: 5 times
Been thanked: 6 times

Re: Create UDP socket EB023

Post 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.
Attachments
TestUDP.fcfx
(14.22 KiB) Downloaded 198 times
The older the boy the bigger the toy

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times

Re: Create UDP socket EB023

Post 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

JFinlayson
Posts: 93
Joined: Mon Sep 23, 2013 4:33 pm
Has thanked: 5 times
Been thanked: 6 times

Re: Create UDP socket EB023

Post 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.
Attachments
TestUDP.fcfx
(13.95 KiB) Downloaded 196 times
The older the boy the bigger the toy

JFinlayson
Posts: 93
Joined: Mon Sep 23, 2013 4:33 pm
Has thanked: 5 times
Been thanked: 6 times

Re: Create UDP socket EB023

Post 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.
The older the boy the bigger the toy

JFinlayson
Posts: 93
Joined: Mon Sep 23, 2013 4:33 pm
Has thanked: 5 times
Been thanked: 6 times

Re: Create UDP socket EB023

Post 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.
Attachments
TestUDP.fcfx
(15.21 KiB) Downloaded 194 times
The older the boy the bigger the toy

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times

Re: Create UDP socket EB023

Post 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

Post Reply