Whats coming for AVRCo and XMega's ?

  • 1
  • 2
  • Page 2 of 2
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Whats coming for AVRCo and XMega's ?

 · 
Posted: 16.12.2013 - 20:25  ·  #9
I fully agree, but I was thinking about much different approach which is not CPU hungry. If we are willing to sacrifice accuracy, then for example we can have 1ms SysTick and in 1st OnSysTick we activate output pin, in 2nd OnSysTick we check if input pin was activated and if it was we don't have a touch catch and we don't increment that channel semaphore. We wait for a catch for a predetermined number of SysTicks (found experimentally for a given resistor). If all SysTicks pass we don't have a catch and we decrement our sempahore. If there is a catch we increment our semaphore and deactivate our output for one SysTick. After all that we go all over again. For a simple touch button we don't care on what SysTick was our input pin activated. For some applications we care about this info and then some analog value representing SysTick number could be used instead of semaphore. If we need a quicker reaction, we can set our SysTick to less then 1ms (down to 0.1ms), but we will be limited with resistor and user pressing the key.

This should be possible if we connect our pins as shown here:

There is no actual capacitor. Just one plate of it (like foil or brass PCB area), and human hand is making the other plate, which combined with depth of (for example) plastic or glass housing makes a capacitor good enough to exploit. Capacitance increases with human hand "touching" the "key". Experiments were successful even with humans not standing on the ground.
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Whats coming for AVRCo and XMega's ?

 · 
Posted: 16.12.2013 - 21:50  ·  #10
Hello Avra,

without any stray capacitance the input pin will raise immediately within one systick, ok?
With a human capacitor this rising must be slower than at least two systicks, I think.
Can this be achieved with the human capacitor??
And because it is done within a timer interrupt, if there are many other interrupts,
like UART, other Timers etc. your scanning will come in some problems.
Or do I miss something?

How about a small test program to verify your assumption?

btw.
With XMegas a Systick below 2msec is not applicable for some reasons.
So you must use a Timer Tick.

rolf
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Whats coming for AVRCo and XMega's ?

 · 
Posted: 24.12.2013 - 23:40  ·  #11
Quote by rh
...because it is done within a timer interrupt, if there are many other interrupts,
like UART, other Timers etc. your scanning will come in some problems.

Why should there be any problems? I don't care if receive pin turns on after (for example) 10, 12, 15 or 25 SysTicks as long as in my experiment I calibrated that there is a touch detected for sure if after (for example) n=8 SysTicks I still have zero on receive pin. Why would I care if some interrupt brings a little delay that could not be measured by my eye? All I care is that 1 will not show on receive pin until n SysTicks. If it shows before n there is no touch, and if it doesn't show then there is a touch detected on that receive pin. All that can be looped and repeated for continuous touch detection of 1 or more touch channels. Touch detection should come almost free and with very little SysTick overhead.
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Whats coming for AVRCo and XMega's ?

 · 
Posted: 25.12.2013 - 14:33  ·  #12
Hi Avra,

please build a small demo and publish it here so users can verify it.

rolf
  • 1
  • 2
  • Page 2 of 2
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   74   88 · Page-Gen-Time: 0.045189s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI