BL0032 windspeed

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

Moderator: Benj

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

BL0032 windspeed

Post by Monie Jacobsen »

Hi everyone
Want to be able to read pulses on one entrance.
Is there anyone here who will help
Have tried many times but without result
Med still can't read a frequency
Attachment:
READ FREQUENCY_BL0032.fcfx
(11.51 KiB) Downloaded 349 times
Do you have a code suggestion so that it becomes possible to read a sequence?
Best Regard
Monie

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: BL0032 windspeed

Post by mnf »

Hi Monie,

You don't seem to enable your timer interrupt in the code sample...

Martin

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Post by Monie Jacobsen »

Hi mnf

OK, I look at this and return to you.
Thank you so much for your attention.
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Post by Monie Jacobsen »

Hi mnf

Have tried the attachment below!
But can't make WindSpeed work :oops:
Attachment file:
BL0032_PulsIn.fcfx
(14.51 KiB) Downloaded 340 times
Best Regard
Monie

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: BL0032 windspeed

Post by mnf »

I did a simple frequency counter example here: viewtopic.php?f=26&t=20970&hilit=Frequency+counter that used two interrupts to count frequency... I used a rtc chip to generate the 1s interrupt rather than an inbuilt timer.
I have an anemometer here that came from a broken weather station I will can havea play with - but not too to tomorrow evening - and hopefully you'll be up and running by then :D

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Post by Monie Jacobsen »

Hi mnf
Thank you so much for your suggestion.
The codes look exciting.
I usedsPIC Programmer BL0032
User I2C 4 line Display:
And user input B0
User FG085 Function Generator.

When pulse in at 92 Hz is displayed "PulsIn: 5050".
Where I wanted to be shown 9.2 m/s
Do you see where things go wrong in the codes?
Please see attachment:
BL0032_PulseInTest.fcfx
(18.14 KiB) Downloaded 283 times
Best Regard
Monie

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: BL0032 windspeed

Post by mnf »

Hi Monie,

This is trying to do something different? Measure the length of a received pulse?

Martin1 (medelec) posted some PIC code here viewtopic.php?f=26&t=14749&p=59273&#p59273 that may do what you need?

Martin

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Post by Monie Jacobsen »

Hi everyone

Regarding interrupt port for BLl0032
Does anyone have a record of interrupt for Port and Pin. number.
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Post by Monie Jacobsen »

Hi everyone
I wish here to be able to press 2x keyboards simultaneously.
Keyboards type:BL0138
As an example: Press = 10 and Press = 11
Do you have a suggestion on how to write it as codes?
Press.JPG
Press.JPG (38.02 KiB) Viewed 19472 times
Last edited by Monie Jacobsen on Tue Oct 01, 2019 6:55 am, edited 1 time in total.
Best Regard
Monie

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: BL0032 windspeed

Post by medelec35 »

Hi Moni,
Monie Jacobsen wrote:HI medelec35
Pulse & frequency Meter User BL0032 - 16-Bit dsPIC ?
I have tried a lot to make your codes work with BL0032 - 16-Bit dsPIC but, with no luck!
Is it something you want to help with?

Please see attachment below;-)
Attachment:
Pulse & frequency Meter using CCP R1_v6_Test.fcfx
What about the basic frequency counter I created for you in 2012:
https://www.matrixtsl.com/mmforums/viewtopic.php?f=28&t=20253&p=89433&#p89433
That could be a starting point for you?
Martin

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Post by Monie Jacobsen »

HI medelec35

"The basic frequency counter you created for me in 2012"
It will be very good to use in connecting a BL0032 - 16-bit dsPIC.
Just made the frequency counter work ;-)
But I do not have the opportunity to choose other ports from which I can read the Frequency.
Can only read from PB1!
Missing record for attach interrupt options, stating Time 1 to Time 9 And their respective Pin number.
Is it something you want to help inform?
Best Regard
Monie

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: BL0032 windspeed

Post by medelec35 »

Hi Monie,
you can only use different pins if the interrupt allows you to via port mapping.
Martin

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Post by Monie Jacobsen »

Hi medelec35

Want to use different Interrupt for BL0032 - 16-bit dsPIC.
But the Pin numbers are missing!
Therefore, I need an overview of connectivity options
Properties Interrupt.JPG
Properties Interrupt.JPG (37.38 KiB) Viewed 19443 times
Is that something you can help with?
Have no experience with IOC PORT!

See attachment:
READ FREQUENCY_BL0032.fcfx
(12.73 KiB) Downloaded 177 times
Best Regard
Monie

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: BL0032 windspeed

Post by medelec35 »

The timer interrupt is just for that purpose alone.
Does the INT/0 have a remap option?
Just select properties and change the selection to the required pin.
If not, then you can select INT/0 to INT/4.
If that is possible then hardware redesign?
Martin

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: BL0032 windspeed

Post by medelec35 »

I have just looked at your flowchart.
You are using INT2 and it does have a remap option, so you can select RB0 to RB15 etc.
Martin

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Post by Monie Jacobsen »

Hi medelec35
Now read READ FREQUENCY_BL003 signal via Port as described below.
User:
INT4 = RB8 (Port BH)
INT4 = RB7 (Port D7G)
INT4 = RF0 (Port F0)

Thank you so much for your great help ;-)
Now I can work on the project...
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Post by Monie Jacobsen »

Hi everyone
I wish here to be able to press 2x keyboards simultaneously.
Keyboards type:BL0138
As an example: Press = 10 and Press = 11
Do you have a suggestion on how to write it as codes?
See the picture below:
KeyPad_BL0138.JPG
KeyPad_BL0138.JPG (31.06 KiB) Viewed 19399 times
Best Regard
Monie

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

Re: BL0032 windspeed

Post by LeighM »

Hi Monie,
The design of the keypad is such that you cannot press two keys at once and know what they are.
Only one key press at a time is detected.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Post by Monie Jacobsen »

Hi LeighM
Do you have another suggestion that will have the same effect of activating 2 KeyPad?
Best Regard
Monie

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: BL0032 windspeed

Post by medelec35 »

Hi Monie,
I have no idea if attached will work.
Can you let me know please?
Attachments
Multiple Keys.fcfx
(8.57 KiB) Downloaded 169 times
Martin

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Post by Monie Jacobsen »

Hi medelec35
Has insert a comment in attached codes!
Cannot then use KeyPad again!
Or continue with the codes afterwards!
Please see the codes here:
Attachment file:
BL0032_KeyPress.fcfx
(58.59 KiB) Downloaded 303 times
Best Regard
Monie

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: BL0032 windspeed

Post by medelec35 »

Not sure what you are saying, but I have modified your flowchart.
Attachments
BL0032_KeyPress.fcfx
(59.28 KiB) Downloaded 151 times
Martin

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Post by Monie Jacobsen »

Hi medelec35

It just works now ;-)
Thank you very much :D
Best Regard
Monie

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: BL0032 windspeed

Post by medelec35 »

Looking at the first loop,it has now been made redundant.
All you need is:
Dual Keypress.png
(49.09 KiB) Downloaded 2255 times
Martin

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: BL0032 windspeed

Post by medelec35 »

Monie Jacobsen wrote:It just works now
Thanks for letting me know, I was not sure without hardware to test it on.
The flowchart is just relying on the fact that two keys are never pressed and released within a few microseconds of each other.
Martin

Post Reply