Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:10 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Armite L4 counting

Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 06:54am 16 Mar 2019
Copy link to clipboard 
Print this post

Nucleo STM32L432

I am seeing double when I try to use both counting pins.
Whichever pin I pulse , both internal counters increase.
I have got around the problem by using an interrupt for one of the counters but there is something fishy going on.

  Quote   CONST wind = 6
CONST rain = 22

SETPIN wind, CIN
SETPIN rain, CIN
SETTICK 2000, tick

DO
LOOP

SUB tick
PRINT PIN(wind), PIN(rain)
END SUB


I use a 10k pullup resistor on each to V+ and capacitors across the inputs. I also tried a pulldown resistor instead but both counters still increment in unison.
I can't see any glitches with my CRO.

Jim

VK7JH
MMedit
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 07:47am 16 Mar 2019
Copy link to clipboard 
Print this post

I think I had got my Ors and my ANDs mixed up.
Please try attached - untested

2019-03-16_174719_ArmmiteL4.zip
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:48am 16 Mar 2019
Copy link to clipboard 
Print this post

Much better thank you.

Jim
VK7JH
MMedit
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025