Page 1 of 2
BL0032 windspeed
Posted: Wed Sep 25, 2019 11:19 am
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:
Do you have a code suggestion so that it becomes possible to read a sequence?
Re: BL0032 windspeed
Posted: Wed Sep 25, 2019 1:57 pm
by mnf
Hi Monie,
You don't seem to enable your timer interrupt in the code sample...
Martin
Re: BL0032 windspeed
Posted: Wed Sep 25, 2019 2:38 pm
by Monie Jacobsen
Hi mnf
OK, I look at this and return to you.
Thank you so much for your attention.
Re: BL0032 windspeed
Posted: Wed Sep 25, 2019 3:51 pm
by Monie Jacobsen
Hi mnf
Have tried the attachment below
!
But can't make WindSpeed work
Attachment file:
Re: BL0032 windspeed
Posted: Wed Sep 25, 2019 5:30 pm
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
Re: BL0032 windspeed
Posted: Thu Sep 26, 2019 8:37 am
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:
Re: BL0032 windspeed
Posted: Thu Sep 26, 2019 7:14 pm
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
Re: BL0032 windspeed
Posted: Fri Sep 27, 2019 10:51 am
by Monie Jacobsen
Hi everyone
Regarding interrupt port for BLl0032
Does anyone have a record of interrupt for Port and Pin. number.
Re: BL0032 windspeed
Posted: Sun Sep 29, 2019 5:08 pm
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 (38.02 KiB) Viewed 21134 times
Re: BL0032 windspeed
Posted: Mon Sep 30, 2019 8:08 am
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?
Re: BL0032 windspeed
Posted: Mon Sep 30, 2019 8:35 am
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?
Re: BL0032 windspeed
Posted: Mon Sep 30, 2019 10:01 am
by medelec35
Hi Monie,
you can only use different pins if the interrupt allows you to via port mapping.
Re: BL0032 windspeed
Posted: Mon Sep 30, 2019 10:46 am
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 (37.38 KiB) Viewed 21105 times
Is that something you can help with?
Have no experience with IOC PORT!
See attachment:
Re: BL0032 windspeed
Posted: Mon Sep 30, 2019 11:07 am
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?
Re: BL0032 windspeed
Posted: Mon Sep 30, 2019 11:12 am
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.
Re: BL0032 windspeed
Posted: Mon Sep 30, 2019 6:02 pm
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...
Re: BL0032 windspeed
Posted: Tue Oct 01, 2019 7:01 am
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 (31.06 KiB) Viewed 21061 times
Re: BL0032 windspeed
Posted: Tue Oct 01, 2019 10:00 am
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.
Re: BL0032 windspeed
Posted: Tue Oct 01, 2019 10:23 am
by Monie Jacobsen
Hi LeighM
Do you have another suggestion that will have the same effect of activating 2 KeyPad?
Re: BL0032 windspeed
Posted: Tue Oct 01, 2019 11:19 am
by medelec35
Hi Monie,
I have no idea if attached will work.
Can you let me know please?
Re: BL0032 windspeed
Posted: Tue Oct 01, 2019 12:14 pm
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:
Re: BL0032 windspeed
Posted: Tue Oct 01, 2019 12:22 pm
by medelec35
Not sure what you are saying, but I have modified your flowchart.
Re: BL0032 windspeed
Posted: Tue Oct 01, 2019 12:43 pm
by Monie Jacobsen
Hi medelec35
It just works now
Thank you very much
Re: BL0032 windspeed
Posted: Tue Oct 01, 2019 12:43 pm
by medelec35
Looking at the first loop,it has now been made redundant.
All you need is:
Re: BL0032 windspeed
Posted: Tue Oct 01, 2019 12:48 pm
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.