PDA

View Full Version : First time programming a PIC for use with SSR



teilhardo
- 2nd January 2006, 09:18
Hi All,
I just got a MElabs serial programmer, a PIC16F628 PicBasic Pro and
CodeDesigner Lite but I have not a clue as to how to get started. I am
used to using Basic Stamps, and all I want to do is try out this code to turn on and off a solid state relay for a certain amount of time.
(In CodeDesigner Lite):
main:
high 1
pause 60000
Low 1
pause 60000
pause 60000
pause 60000
pause 60000
pause 60000
goto main

But I am not sure what to do when I get to the MeLabs Programmer basic
menu (I am used to using a basic stamp) Does anyone know about this?
Thanks,
Tei

Najim
- 5th January 2006, 16:27
Hey,

You just have to configure the TRIS register and high or low the port connected to your relay(actually to a transistor if the self needs more than 20mA).

ex:

TRISB = %11111110

main:

high portb.0
pause 60000
low portb.0
pause...

something like that should work...

see ya...