Skip to content

Commit

Permalink
add config
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Apr 5, 2014
1 parent 88ea856 commit 9147721
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
19 changes: 10 additions & 9 deletions 18f/main.asm
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 3.3.0 #8604 (May 11 2013) (MINGW32)
; This file was generated Fri Apr 04 21:32:59 2014
; This file was generated Sat Apr 05 18:13:37 2014
;--------------------------------------------------------
; PIC16 port for the Microchip 16-bit core micros
;--------------------------------------------------------
list p=18f26k20
radix dec
CONFIG CP0=OFF,OSCS=ON,OSC=LP,BOR=ON,WDT=ON
CONFIG FOSC=INTIO7,BOREN=OFF,WDTEN=OFF,MCLRE=OFF,STVREN=ON
CONFIG LVP=OFF,CP0=OFF


;--------------------------------------------------------
Expand Down Expand Up @@ -239,30 +240,30 @@ r0x01 res 1
; ; Starting pCode block
S_main__main code
_main:
; .line 21; main.c TRISB = 0;
; .line 24; main.c TRISB = 0;
CLRF _TRISB
_00115_DS_:
; .line 26; main.c PORTB = 0;
; .line 29; main.c PORTB = 0;
CLRF _PORTB
; .line 29; main.c delay ();
; .line 32; main.c delay ();
CALL _delay
; .line 32; main.c PORTB = 0x5A;
; .line 35; main.c PORTB = 0x5A;
MOVLW 0x5a
MOVWF _PORTB
; .line 35; main.c delay ();
; .line 38; main.c delay ();
CALL _delay
BRA _00115_DS_
RETURN

; ; Starting pCode block
S_main__delay code
_delay:
; .line 8; main.c void delay (void)
; .line 11; main.c void delay (void)
MOVFF FSR2L, POSTDEC1
MOVFF FSR1L, FSR2L
MOVFF r0x00, POSTDEC1
MOVFF r0x01, POSTDEC1
; .line 12; main.c for (i = 0; i < 10000; i++)
; .line 15; main.c for (i = 0; i < 10000; i++)
MOVLW 0x10
MOVWF r0x00
MOVLW 0x27
Expand Down
5 changes: 4 additions & 1 deletion 18f/main.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#include <pic18fregs.h>

#include <pic16/pic18f26k20.h>

//#pragma from sddc manual?
// DS41303G-page 300
#pragma config CP0=OFF,OSCS=ON,OSC=LP,BOR=ON,WDT=ON
#pragma config FOSC = INTIO7, BOREN = OFF, WDTEN = OFF, MCLRE = OFF, STVREN = ON
#pragma config LVP = OFF, CP0 = OFF


void delay (void)
Expand Down

0 comments on commit 9147721

Please sign in to comment.