Serac
11-15-05, 04:55 AM
I want to get 3 SRF04 sensors working with IsoPodX(IsoMax V0.82).
The problem is that i have also other sensors that need timers so i would like to use GPIO pins for the triggers to save timers for the other sensors..
The trigger pulse needs to be at least 10us, so it will need some delay since just making the PA7 pin to go ON and OFF takes 2us or at least it did when it was the only thing running on the IsoPodX.
The other sensors i need timers for are at the moment two magnetic quadrature pulse generators, one memsic 2125 dual-axis accelerometer and three SRF08 sensors.
Quadrature decoders take 4 timerpins, accelerometer 2 and I2C for SRF08 takes 2 timers so if i can use home and index pin when i have quardrature decoders in use i have 5 pins left since TMRD3 is used by isomax..
Code example for more than 1 SRF04 sensor would be great, i tried to undestand RMDumse's example code in the "SRF04 connections" thread http://www.newmicros.com/discussion/showthread.php?t=1059&highlight=SRF04 but didnt quite get it, doesn't seem to be the whole program...
btw. The comments in the code might cause someone a bit confusion if they dont know where the HEX addresses come from.
Thanks for all the help =),
Serac
The problem is that i have also other sensors that need timers so i would like to use GPIO pins for the triggers to save timers for the other sensors..
The trigger pulse needs to be at least 10us, so it will need some delay since just making the PA7 pin to go ON and OFF takes 2us or at least it did when it was the only thing running on the IsoPodX.
The other sensors i need timers for are at the moment two magnetic quadrature pulse generators, one memsic 2125 dual-axis accelerometer and three SRF08 sensors.
Quadrature decoders take 4 timerpins, accelerometer 2 and I2C for SRF08 takes 2 timers so if i can use home and index pin when i have quardrature decoders in use i have 5 pins left since TMRD3 is used by isomax..
Code example for more than 1 SRF04 sensor would be great, i tried to undestand RMDumse's example code in the "SRF04 connections" thread http://www.newmicros.com/discussion/showthread.php?t=1059&highlight=SRF04 but didnt quite get it, doesn't seem to be the whole program...
btw. The comments in the code might cause someone a bit confusion if they dont know where the HEX addresses come from.
Thanks for all the help =),
Serac