Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

i2c monostable

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
nicofer

Bascom Member



Joined: 01 May 2013
Posts: 90
Location: GRJ

southafrica.gif
PostPosted: Fri Oct 29, 2021 1:14 pm    Post subject: i2c monostable Reply with quote

Hi
I need a programmable monostable - similar to a 555 one shot - but I want to be able to change the pulse length .


Time delay between 0.5 sec to about 10 seconds but that is not critical .

Active high input trigger.

The WWW and Google was not very helpful .

BASCOM to the rescue !

I am thinking about a TINY AVR with I2C slave lib - to set the time delay - one input pin for trigger and then one pin for output .
One byte time delay range is fine.

Any ideas on the best small AVR and slave lib combination for this ? ( 8 pin if possible )


Kind regards
Nico

(BASCOM-AVR version : 2.0.8.4 )
Back to top
View user's profile
Meister

Bascom Member



Joined: 27 May 2010
Posts: 319

blank.gif
PostPosted: Fri Oct 29, 2021 3:29 pm    Post subject: Reply with quote

Here is Arduino code:
https://github.com/bigjosh/TimerShot/blob/master/TimerShot.ino
Should not be difficult to translate to Bascom because the timer settings are well commented.
The pulse can be triggered only by calling the function
OSP_SET_AND_FIRE(o);
so triggering will flicker somewhat.
The "xtinies" reportedly have a one-shot incorporated in hardware.

For the Xmega I had provided a solution in this forum several years ago.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum