Help on PIC12C509


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2005
    Posts
    17

    Question Help on PIC12C509

    Please help me get started writing a code that will do this..
    Target uC PIC12C509..

    GPIO2 will go HI for 10 seconds then LOW for 3 seconds then
    GPIO1 will go HI for another 10 seconds and LOW for 3 seconds then repeat until
    GPIO3/MCLR goes to LO..

    How can I do this in BASIC??

    TIA

    rhonn

  2. #2
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Code:
    REPEAT
    HIGH GPIO.2
    PAUSE 10000
    LOW GPIO.1
    PAUSE 3000
    HIGH GPIO.1
    PAUSE 10000
    LOW GPIO.1
    PAUSE 3000
    UNTIL GPIO.3=0
    But you should have a look at your PBP MAnual and the BLINK.BAS example
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  3. #3
    Join Date
    Apr 2005
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Hi,
    I tried simulating it in Proteus..using the schematic attached..
    Is it correct? I got this error:

    [U1] Loading HEX file 'TIMER2.HEX'.
    FATAL: [U1] Program or EEPROM data has invalid address [0FFF] for this device

    What's wrong?
    Attached Images Attached Images  

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