• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Resource icon

Emergency Double Strobe Flip/Flop 2011-07-01

Double flash flip/flop with a PIC12

Notes:

  • Any switching NPN transistor will work.
  • U1 = PIC12Fxxx (675/629/684), check your datasheets to see if others will work with this.

Schematic

strobe-flip-flop.gif

Code

C:
#include <system.h>

#pragma DATA_CONFIG, _MCLRE_OFF&_WDT_OFF&_INTRC_OSC_CLKOUT

#pragma CLOCK_FREQ 4000000

void main()
	{
	cmcon =7;
	trisio = 0b00001000
	gpio = o;
	delay_ms(500);
	
	while (1)
		{
		gpio.0 = 1;
		delay_ms(100);
		gpio.0 = 0;
		delay_ms(50);
		gpio.0 = 1;
		delay_ms(100);
		gpio.0 = 0;
		delay_ms(150);
		gpio.0 = 1;
		delay_ms(100);
		gpio.0 = 0;
		delay_ms(50);
		gpio.0 = 1;
		delay_ms(100);
		gpio.0 = 0;
		}
	
	return;
	}
Author
SyPTo
Views
261
First release
Last update
Rating
0.00 star(s) 0 ratings

EE World Online Articles

Loading
Top