robarino Newbie
 Joined: 15/03/2012 Location: SwedenPosts: 24 |
| Posted: 07:07am 16 Mar 2012 |
|
|
|
WOW Thanks for all that!
Geoff the initial code that you wrote was exactly what I was doing. Now I am sure that is right...I think my confusion is the pin setup on the duinomite mega rev c. I have plugged in the grounf from the headphone jack into the ground on my board. I then tried to plug in the signal to lots of different ports and get nothing.
I am using this document and it says pin A4, A5 and D10 with corresponding pin names 13,11,9
So I write this connected to A4:
[code]
SOUND 100000, 3600000 ' 100KHz for a long time (1 hour)
SETPIN 13,5 ' set pin 13 as a counting input
...
PRINT PIN(13) ' get the count
...
PRINT PIN(13) ' count should have incremented
etc.
[/code]
@Tassyjim I don't need the timing for processes per se. I am measuring mechanical vibrations and I need a timer that could count by 10 microseconds. If I sample at 2 kHz I can live with a timer of 500 microseconds with +/- 9.99999 microsecond accuracy. To be honest I am shocked at how fast the sd card writes. It completely blows NETMF out of the water for sd write times and array filling.
I have run this code numbered and I get 1's from every port. In addtion MMBASIC will only allow setpin 12,5 and setpin 13,5.
Frankly it there is a little confusion on my part concerning the olimex hardware documentation...pins layout etc.
In this respect I would like to contribute though by taking the Arduino examples and rewriting them in Basic for the beginners though. Those resources help a lot.
DUINER.com
Edited by robarino 2012-03-17 |