Deutsch English Français Italiano |
<0b542d485b.DaveMeUK@BeagleBoard-xM> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: David Higton <dave@davehigton.me.uk> Newsgroups: comp.sys.raspberry-pi Subject: Re: Need help with PI PICO... Date: Wed, 27 Mar 2024 11:59:01 GMT Organization: Home Lines: 31 Message-ID: <0b542d485b.DaveMeUK@BeagleBoard-xM> References: <utn4f2$3p985$1@dont-email.me> <20240323183723.b2902fb94d75422b924c1bc7@eircom.net> <utnkjj$3t5m0$1@dont-email.me> <20240324072346.81064ff46570e669982a1f4e@eircom.net> <utp1sm$acjh$1@dont-email.me> <utrna6$113rn$3@dont-email.me> <uts6t5$163q2$1@dont-email.me> <utvgdi$2cg59$1@dont-email.me> <uu0rh5$2pcls$1@dont-email.me> Injection-Date: Wed, 27 Mar 2024 11:59:10 +0100 (CET) Injection-Info: dont-email.me; posting-host="2b1bed71d2e25421772e769bba20a9f7"; logging-data="2977741"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/kFPBCe9NQX/YudWwJyn+W0ZwJkbkTgQg=" User-Agent: Messenger-Pro/8.03 (MsgServe/8.01) (RISC-OS/5.29) NewsHound/v1.54 Cancel-Lock: sha1:OWC3Wte2tQefm2bJVLI6bxzGyxk= Bytes: 2313 In message <uu0rh5$2pcls$1@dont-email.me> The Natural Philosopher <tnp@invalid.invalid> wrote: > I am slightly curious as to how the PICO could miss what is a several > hundred microsecond wide pulse. AFAICS there are many pitfalls: 1) An interrupt can be being serviced, so the pulse is over before you get to see it. 2) If you're looking for a pulse, you should be looking edge triggered rather than level triggered, but even then you may not get to react to the edge immediately because of an interrupt being serviced, so you'd get an anomalous result. 3) You can look level triggered, but you need to turn off all interrupts to ensure you really are loking at it in real time. 4) I had a play with an ultrasonic ranger a couple of years or so ago. I couldn't understand why I wasn't getting any return pulses at all. I eventually realised that I was sending another start pulse before the current cycle had finished. Regardless, you need an escape from any and every potential infinite loop. Whatever you're doing. If you can use a hardware timer in the chip, that's a much more reliable solution. David