Maintenance notice: These forum archives are read-only, and will be removed shortly. Please visit our forums at their new location, https://www.evilmadscientist.com/forums/.

What's wrong ? there can't affecting any registers on PIC16F1455

edited August 2016 in General
Hello everyone,
I'm B and I'm a student. The vexed problem couldn't make me sleep well. (Oh you must think I am not a good student) I'm certain I'm doing something simply stupid and wrong, but I can't figure it out.
So I'm simply trying to flash an LED, the PIC16F1455 datesheet was there :  (this is for a digital electronics course I'm studying, I wanted to start with PIC's for microcontrollers for multiple reasons) so my classmates will provide an external 1 Hz clock and the first program is simply a "hello world" flash an LED on RC3.  I've tried multiple codes with nothing working, you can even see that in this latest rendition, I've just dropped FFFF onto LATC. I've also tried to replace mnemonics with direct addressing (actually addressing the LATC register instead of calling it by name).  Running it in simulator, NONE of the registers are changing - not even the bank select register, even when I try to address it directly.  This is only one sample code, unfortunately I've tried about ten different renditions and obviously I'm not about to post every single one. So this is only one of many examples.  But I'll happily take input as to what on earth you think I'm doing wrong. 

Comments

  • edited August 2016

    CODE:
    #include "p16F1455.inc"
    ; CONFIG1
    ; __config 0xFFFF
    __CONFIG _CONFIG1, _FOSC_ECH & _WDTE_ON & _PWRTE_OFF & _MCLRE_ON & _CP_OFF & _BOREN_ON & _CLKOUTEN_OFF & _IESO_ON & _FCMEN_ON
    ; CONFIG2
    ; __config 0xFFFF
    __CONFIG _CONFIG2, _WRT_OFF & _CPUDIV_CLKDIV6 & _USBLSCLK_48MHz & _PLLMULT_3x & _PLLEN_ENABLED & _STVREN_ON & _BORV_LO & _LPBOR_OFF & _LVP_ON
    org H'0000' ;makes sure that the flash memory starts at 00
    ;program starts here
    banksel H'0001'
    clrf H'008E'
    banksel H'0002'
    loopy1 movlw H'FFFF'
    movwf H'010E'
    clrf H'010E'
    goto loopy1
    end
Sign In or Register to comment.