Git Product home page Git Product logo

bouncy-button's People

Contributors

adamfk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bouncy-button's Issues

consider sampling improvements

update

I ran a bunch more exhaustive tests over night. No issue found. I believe my original test setup for observing the problem may have been flawed. Closing until we have a better test methodology.


TLDR

We may occasionally log an extra pulse. It seems rather rare at this point unless you connect a 200+ kHz self generated signal.

I'm not overly concerned about it. It would be nice to fully understand or have another person help test/validate.

More details

It's difficult to know exactly how the AVR architecture works regarding the edge counting peripheral and digital input synchronization/sampling. Some things in the datasheet seem to contradict others and also earlier tests.

This simulation is my current understanding.

The problem still doesn't quite make sense to me. If my simulation/model is accurate, then there should be certain times when we sample the pin as low and the next CPU instruction, we sample the rising edge count as increased. This does happen if I self test with a frequency between 210 kHz (gen a37) and 381 kHz (gen a20). How often we see it drops off as frequency decreases.

image

If it is a simple lining up issue, we should see it happen with a probability of roughly 1/40. However, when I test with frequencies slower than gen a37, it runs a lot without detecting any issue.

I'm also running a frequency sweep with my picoscope and an NPN (and external 1k pullup). It started at 100 kHz (the fastest it can) and has run for hours already. I modified code to not wait for stable or even detect initial change so it would go faster and hopefully remove any factors preventing reproducing the 1/40 issue. gen a30 does reproduce the issue right away even with the modifications.

image

More

Interesting that gen a38 gives a period of almost 2x constant logging speed of around 40 instruction cycles. Perhaps this issue is related to that.

Should try pattern generator that can vary spacing between pulses.

Browser - support IDE timestamping

Could be useful to have timestamps. Initially, we should just ignore them in the browser if they are present.

image

21:42:02.547 -> #################### Test #1 ####################
21:42:02.547 -> Section count: 1, type: "Normal"
21:42:02.581 -> Waiting for stable input... good.
21:42:03.091 ->           _ 
21:42:03.091 ->          | | 
21:42:03.091 ->  _ __ ___| | ___  __ _ ___  ___ 
21:42:03.091 -> | '__/ _ \ |/ _ \/ _` / __|/ _ \
21:42:03.091 -> | | |  __/ |  __/ (_| \__ \  __/
21:42:03.091 -> |_|  \___|_|\___|\__,_|___/\___|
21:42:03.091 -> Release the button (it is currently pressed == logic low)
21:42:03.091 -> <test>

browser - support 'gg' and 'dtg'

gg - Glitch Guard. Useful with 'dtg'. Marks data to here as good.
dtg - Delete To last Glitch Guard 'gg'. Useful if wires glitch and a bunch of bogus data is recorded.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.