Noobie programmer


Results 1 to 12 of 12

Threaded View

  1. #1
    noobie's Avatar
    noobie Guest

    Default Noobie programmer

    Hi! I am currently a new programmer programming a PIC16C745 IC. Can any people out there take a look at my code and advice me what is wrong.I am trying to detect an input at RB0 and give an output and RB5. Thanks!

    #include <p16c745.inc>

    #define LED PORTB,5 ;
    #define switch PORTB,0 ;


    ORG 00H ;
    BCF STATUS, RP1 ;
    BCF STATUS, RP0 ;
    CLRF PORTB ; Initialize PORTB by
    ; clearing output
    ; data latches
    BSF STATUS, RP0 ; Select Bank 1
    MOVLW 06H ; Configure all pins
    MOVWF ADCON1 ; as digital inputs
    MOVLW 0xCF ; Value used to
    ; initialize data
    ; direction
    MOVWF TRISB ; Set RB<3:0> as inputs
    ; RB<5:4> as outputs
    ; TRISB<7:6> are always
    ; read as ’0’.
    GOTO main ;
    main BTFSS switch ;
    GOTO $-1 ;
    BSF LED ;
    BTFSC switch ;
    GOTO $-1 ;
    BCF LED ;
    GOTO main ;

    end
    Last edited by noobie; - 27th April 2006 at 10:07.

Similar Threads

  1. Melabs U2 Programmer Command Line Options
    By Robert Wells in forum General
    Replies: 5
    Last Post: - 3rd July 2009, 02:11
  2. problems with USB programmer
    By malc-c in forum General
    Replies: 7
    Last Post: - 10th May 2007, 20:14
  3. USB programmer problems
    By uiucee2003 in forum USB
    Replies: 2
    Last Post: - 15th August 2006, 23:47
  4. Melabs USB Programmer
    By tmurph in forum General
    Replies: 1
    Last Post: - 25th December 2005, 03:25
  5. General Programmer Questions
    By mslaney in forum General
    Replies: 1
    Last Post: - 17th December 2004, 18:16

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