can someone help me check?


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Malaysia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    hi melanie!

    i will try your method of going about the whole wiring and placement of components on the board and post my results later on tonite (now since i know how to take proper snap shots of the board). have to go dig out my LED's. hehe. oh just wondering the language you're using? is it basic stamp? i don't recognise it really and i tried certain codes which were written that way and the compiler didn't recognise it. I'm using PICBasic Pro for compiler, Microcode as editor and Epic Programmer to burn to the chip. But your way of coding seems a lot more easier. this is the one i have for PICBASIC PRO. does the same thing but differently.

    Code:
    'PicBasic Pro codes
    Loop:
        High PORTB.0
        Low PORTB.1
        Pause 500
        Low PORTB.0
        High PORTB.1
        Pause 500
        Goto Loop
    -·=»‡«=·- saturnX -·=»‡«=·-

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I am using PICBasic Pro in my example (this is a MeLabs compiler site after all!). That example WILL compile with the command line...

    pbp -p16F84A Filename

    All I did was alias PortB.0 to LED, and use LED thereafter... applying this to your example...

    Code:
        @ DEVICE pic16F84A, XT_OSC
        @ DEVICE pic16F84A, WDT_ON
        @ DEVICE pic16F84A, PWRT_ON
        LED var PortB.0
        AntiLED var PortB.1
        TRISA=%00000000
        TRISB=%00000000
    Loop:
        High LED
        Low AntiLED
        Pause 500
        Low LED
        High AntiLED
        Pause 500
        Goto Loop
    of course you can always simplify the whole (original) loop...
    Code:
    Loop:
        Toggle LED
        Pause 500
        Goto Loop
    Aliasing you will find in your PBP manual. TRISA/TRISB you will find in the PICs Datasheet, and @ DEVICE you will find here...

    http://www.picbasic.co.uk/forum/showthread.php?t=543

Similar Threads

  1. TMR1 external LP xtal setup check
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th October 2009, 18:11
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. PIC16F877A - Timer0 won't interrupt
    By WishMaster^ in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 25th April 2007, 08:25
  4. Code check -- button not working
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 2nd March 2006, 22:43
  5. Even Parity Check, How?
    By Mark Scotford in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th January 2005, 09:21

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