wanted a code for pic16f84a

Discussion in 'Embedded Systems and Microcontrollers' started by pgstone, Aug 17, 2006.

  1. pgstone

    Thread Starter New Member

    Aug 17, 2006
    1
    0
    Hi, im new to this, I want a hex file for the 16F84A Pic. it would need 8 outputs and one button. I want to use it to switch Eeproms 1 - 8 on my CB radio. Can anyone help? All I can find on the net is LED chassers and I cant write it because I dont know QBasic, so on. Peter
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Hi,

    Is there a reason that the switching can't be done with a manual pushbutton?

    I don't think Qbasic outputs executables that run on PIC's.
     
  3. xtiantrilix

    New Member

    Jul 24, 2008
    1
    0
    list p = 16f84a
    #include<p16f84a.inc>
    _config 19h

    bsf 03h,5
    movlw b'00001' ;//input specifically ra0
    movwf 085h
    movlw 0h ;//output rb0-rb7
    movwf 086h
    bcf 03h,5

    start

    btfss 05h,0 ;//the action is it will output on 8 ports when switch is toggled
    goto start
    movlw b'1111111'
    movwf 06h
    gotostart
    end

    ;//so that's the end of the sourcecode.. just email me if you
    ;//want something.. i am very glad to help you xtian.trilix@gmail.com
     
Loading...