+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    teilhardo's Avatar
    teilhardo Guest

    Default First time programming a PIC for use with SSR

    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

  2. #2
    Najim's Avatar
    Najim Guest

    Default

    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...

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  2. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  3. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  4. PIC programming algorithm - where is it to find?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th June 2007, 18:31
  5. New to PIC Programming
    By Keiou in forum General
    Replies: 3
    Last Post: - 29th October 2003, 19:13

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts