• AVR Freaks

AnsweredHot!Struggling with P12F580 "hello" program in assembly

Page: 12 > Showing page 1 of 2
Author
cdoc83
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2021/01/25 11:41:49
  • Location: 0
  • Status: offline
2021/01/25 15:27:50 (permalink)
0

Struggling with P12F580 "hello" program in assembly

Hey all, I wrote a few small programs in assembly about 10 years ago. I have a drawer full of PICs. I recently decided to pick them back up, but I can't even get a simple program to run to turn an LED on. I have gathered that Microchip has dumped MPASM in favor of pic-as in the XC8 compiler. It took me a couple of hours finding enough info on how to change the code from a simple tutorial (https://www.circuitbread....controller-pic10f200), and I finally have code that will compile and upload to the board successfully, but the LED never turns on :(
 
Here's the code:
PROCESSOR 12F508
#include <xc.inc>

CONFIG OSC = IntRC
CONFIG WDT = OFF
CONFIG MCLRE = OFF
CONFIG CP = OFF

psect code
org 0

init:
movlw 0b11111011 ;gp2 as output
tris GPIO
bsf GP2 ; have also tried bsf GPIO, 2


loop:
goto loop

end

 
I connected an LED with resistor across Vdd and Vss to make sure the board has power. I'm also confident I have a working LED with resistor on GP2 in the correct orientation. But, it never lights up. What have I missed?
#1
blue_led
New Users
  • Total Posts : 89
  • Reward points : 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/25 16:26:58 (permalink)
0
 
try this:

movlw b'11111011' ; gp2 as output
tris GPIO
bsf GPIO, GP2

post edited by blue_led - 2021/01/25 16:47:02
#2
dan1138
Super Member
  • Total Posts : 4242
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/25 17:11:51 (permalink) ☼ Best Answerby cdoc83 2021/01/26 14:44:17
+1 (1)
@cdoc83,

Give this a try:
;
; File:     main.S
; Target:   PIC12F508
; Author:   dan1138
; Date:     2021-01-25
; Compiler: pic-as(v2.31)
; IDE:      MPLABX v5.45
;
; Description:
;
;   Example project for the PIC12F508 controller using the pic-as(v2.31) tool chain.
;
; Add this line in the project properties box "pic-as Global Options -> Additional options":
;
;   -Wa,-a -Wl,-DCODE=2,-pStartCode=0h,-pResetVec=01ffh
;
    PROCESSOR   12F508
    PAGEWIDTH   132
    RADIX       dec
;
; Include target specific definitions for special function registers
;
#include <xc.inc>
;
; Set the configuration word
;
  CONFIG  OSC = IntRC           ; Oscillator Selection bits (internal RC oscillator)
  CONFIG  WDT = OFF             ; Watchdog Timer Enable bit (WDT disabled)
  CONFIG  CP = OFF              ; Code Protection bit (Code protection off)
  CONFIG  MCLRE = ON            ; GP3/MCLR Pin Function Select bit (GP3/MCLR pin function is MCLR)
;
; Declare one byte in RAM
;
    PSECT   MainData,global,class=RAM,space=1,delta=1,noexec
    global  Counter
Counter:    DS      2
;
; Simple test application that implements a
; delay function then sets GPIO bit GB2 high
; calls the delay function, then sets GPIO
; bit GB2 low, calls the delay function then loops.
;
    PSECT   StartCode,class=CODE,delta=2
    global  Start, Delay, main, Loop
Start:
    clrf    Counter
    clrf    Counter+1
    goto    main
;
Delay:
    incfsz  Counter,F                   ; Increment Counter value low 8-bits
    goto    Delay
    incfsz  Counter+1,F                 ; Increment Counter value high 8-bits
    goto    Delay
    retlw   0
;
main:
    movlw   0b11011111  ; Select TIMER0 clock source as FOSC/4
    option
    movlw   0b11111011  ; GP2 as output
    tris    GPIO
;
; Toggle GPIO bit 2
;
Loop:
    bsf     GP2         ; set port bit high
    call    Delay
    bcf     GP2         ; set port bit low
    call    Delay
    goto    Loop
;
; The PIC12F508 reset vector is the highest
; instruction word in the code space.
;
; This is used to load the WREG with the factory
; oscillator calibration value then  the program
; counter rollover to zero to start the code.
;
; This example code places a GOTO instruction here.
;
; WARNING:  Programming a real part with this code
;           will erase the oscillator calibration value
;           set when the part was manufactured.
;
    PSECT   ResetVec,class=CODE,delta=2
    global  ResetVector
ResetVector:
    goto    Start

    end     ResetVector

post edited by dan1138 - 2021/01/25 18:37:22
#3
lakis70
Starting Member
  • Total Posts : 33
  • Reward points : 0
  • Joined: 2021/01/13 17:08:32
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/25 19:18:44 (permalink)
0
dan1138
@cdoc83,

Give this a try:[code];
  CONFIG  MCLRE = ON            ; GP3/MCLR Pin Function Select bit (GP3/MCLR pin function is MCLR)

take care to connect the mclr to vdd.
what about the calibration code?
#4
dan1138
Super Member
  • Total Posts : 4242
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/25 20:41:09 (permalink)
0
lakis70
dan1138
@cdoc83,

Give this a try:
;
CONFIG  MCLRE = ON            ; GP3/MCLR Pin Function Select bit (GP3/MCLR pin function is MCLR)


take care to connect the mclr to vdd.
what about the calibration code?

My example code is already complicated.
 
Asking the Original Poster(OP) to deal with setting the internal oscillator calibration seems too much work for not enough benefit.
 
Also I expect that the OP will leave the device programmer connected but you are correct that MCLR will need a pull-up when the ICD is not connected.
#5
cdoc83
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2021/01/25 11:41:49
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/26 07:52:37 (permalink)
0
blue_led
 
try this:

 
movlw b'11111011' ; gp2 as output
tris GPIO
bsf GPIO, GP2
 





Compiler error: main.asm:30:: error: (876) syntax error.  I've been befuddled by that though, if there are any suggestions on why it won't take GP2 as the argument value.
#6
cdoc83
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2021/01/25 11:41:49
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/26 07:54:14 (permalink)
0
dan1138
@cdoc83,

Give this a try:
;
; File:     main.S
; Target:   PIC12F508
; Author:   dan1138
; Date:     2021-01-25
; Compiler: pic-as(v2.31)
; IDE:      MPLABX v5.45
;
; Description:
;
;   Example project for the PIC12F508 controller using the pic-as(v2.31) tool chain.
;
; Add this line in the project properties box "pic-as Global Options -> Additional options":
;
;   -Wa,-a -Wl,-DCODE=2,-pStartCode=0h,-pResetVec=01ffh
;
    PROCESSOR   12F508
    PAGEWIDTH   132
    RADIX       dec
;
; Include target specific definitions for special function registers
;
#include <xc.inc>
;
; Set the configuration word
;
  CONFIG  OSC = IntRC           ; Oscillator Selection bits (internal RC oscillator)
  CONFIG  WDT = OFF             ; Watchdog Timer Enable bit (WDT disabled)
  CONFIG  CP = OFF              ; Code Protection bit (Code protection off)
  CONFIG  MCLRE = ON            ; GP3/MCLR Pin Function Select bit (GP3/MCLR pin function is MCLR)
;
; Declare one byte in RAM
;
    PSECT   MainData,global,class=RAM,space=1,delta=1,noexec
    global  Counter
Counter:    DS      2
;
; Simple test application that implements a
; delay function then sets GPIO bit GB2 high
; calls the delay function, then sets GPIO
; bit GB2 low, calls the delay function then loops.
;
    PSECT   StartCode,class=CODE,delta=2
    global  Start, Delay, main, Loop
Start:
    clrf    Counter
    clrf    Counter+1
    goto    main
;
Delay:
    incfsz  Counter,F                   ; Increment Counter value low 8-bits
    goto    Delay
    incfsz  Counter+1,F                 ; Increment Counter value high 8-bits
    goto    Delay
    retlw   0
;
main:
    movlw   0b11011111  ; Select TIMER0 clock source as FOSC/4
    option
    movlw   0b11111011  ; GP2 as output
    tris    GPIO
;
; Toggle GPIO bit 2
;
Loop:
    bsf     GP2         ; set port bit high
    call    Delay
    bcf     GP2         ; set port bit low
    call    Delay
    goto    Loop
;
; The PIC12F508 reset vector is the highest
; instruction word in the code space.
;
; This is used to load the WREG with the factory
; oscillator calibration value then  the program
; counter rollover to zero to start the code.
;
; This example code places a GOTO instruction here.
;
; WARNING:  Programming a real part with this code
;           will erase the oscillator calibration value
;           set when the part was manufactured.
;
    PSECT   ResetVec,class=CODE,delta=2
    global  ResetVector
ResetVector:
    goto    Start

    end     ResetVector





 
Build failed =(
 
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'F:/Google Drive/Projects/PIC Projects/PIC12F508/CW Sim.X'
make -f nbproject/Makefile-default.mk dist/default/production/CW_Sim.X.production.hex
make[2]: Entering directory 'F:/Google Drive/Projects/PIC Projects/PIC12F508/CW Sim.X'
"C:\Program Files\Microchip\xc8\v2.31\pic-as\bin\pic-as.exe" -mcpu=PIC12F508 -c \
-o build/default/production/main.o \
main.asm \
-msummary=+mem,-psect,-class,-hex,-file,-sha1,-sha256,-xml,-xmlfull -fmax-errors=20 -mwarn=0 -xassembler-with-cpp
"C:\Program Files\Microchip\xc8\v2.31\pic-as\bin\pic-as.exe" -mcpu=PIC12F508 build/default/production/main.o \
-o dist/default/production/CW_Sim.X.production.hex \
-msummary=+mem,-psect,-class,-hex,-file,-sha1,-sha256,-xml,-xmlfull -mcallgraph=std -mno-download-hex
main.asm:104:: error: (1356) fixup overflow referencing psect StartCode (0x1F2) into 1 byte at 0x3F8/0x2 -> 0x1FC (build/default/production/main.o 24/0x1A)
main.asm:106:: error: (1356) fixup overflow referencing psect StartCode (0x1F2) into 1 byte at 0x3FC/0x2 -> 0x1FE (build/default/production/main.o 24/0x1E)
make[2]: *** [dist/default/production/CW_Sim.X.production.hex] Error 1
(908) exit status = 1
make[1]: *** [.build-conf] Error 2
nbproject/Makefile-default.mk:126: recipe for target 'dist/default/production/CW_Sim.X.production.hex' failed
make: *** [.build-impl] Error 2
make[2]: Leaving directory 'F:/Google Drive/Projects/PIC Projects/PIC12F508/CW Sim.X'
nbproject/Makefile-default.mk:91: recipe for target '.build-conf' failed
make[1]: Leaving directory 'F:/Google Drive/Projects/PIC Projects/PIC12F508/CW Sim.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
BUILD FAILED (exit value 2, total time: 456ms)

post edited by cdoc83 - 2021/01/26 07:55:45
#7
cdoc83
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2021/01/25 11:41:49
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/26 07:55:16 (permalink)
0
dan1138
lakis70
dan1138
@cdoc83,

Give this a try:
;
CONFIG  MCLRE = ON            ; GP3/MCLR Pin Function Select bit (GP3/MCLR pin function is MCLR)


take care to connect the mclr to vdd.
what about the calibration code?

My example code is already complicated.
 
Asking the Original Poster(OP) to deal with setting the internal oscillator calibration seems too much work for not enough benefit.
 
Also I expect that the OP will leave the device programmer connected but you are correct that MCLR will need a pull-up when the ICD is not connected.




Thank you for leaving it simple!  And yes, I am leaving the programmer connected.
#8
dan1138
Super Member
  • Total Posts : 4242
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/26 10:11:36 (permalink)
0
cdoc83
dan1138
@cdoc83,

Give this a try:
;
; File:     main.S
; Target:   PIC12F508
; Author:   dan1138
; Date:     2021-01-25
; Compiler: pic-as(v2.31)
; IDE:      MPLABX v5.45
;
; Description:
;
;   Example project for the PIC12F508 controller using the pic-as(v2.31) tool chain.
;
; Add this line in the project properties box "pic-as Global Options -> Additional options":
;
;   -Wa,-a -Wl,-DCODE=2,-pStartCode=0h,-pResetVec=01ffh
;
    PROCESSOR   12F508
    PAGEWIDTH   132
    RADIX       dec
;
; Include target specific definitions for special function registers
;
#include <xc.inc>
;
; Set the configuration word
;
  CONFIG  OSC = IntRC           ; Oscillator Selection bits (internal RC oscillator)
  CONFIG  WDT = OFF             ; Watchdog Timer Enable bit (WDT disabled)
  CONFIG  CP = OFF              ; Code Protection bit (Code protection off)
  CONFIG  MCLRE = ON            ; GP3/MCLR Pin Function Select bit (GP3/MCLR pin function is MCLR)
;
; Declare one byte in RAM
;
    PSECT   MainData,global,class=RAM,space=1,delta=1,noexec
    global  Counter
Counter:    DS      2
;
; Simple test application that implements a
; delay function then sets GPIO bit GB2 high
; calls the delay function, then sets GPIO
; bit GB2 low, calls the delay function then loops.
;
    PSECT   StartCode,class=CODE,delta=2
    global  Start, Delay, main, Loop
Start:
    clrf    Counter
    clrf    Counter+1
    goto    main
;
Delay:
    incfsz  Counter,F                   ; Increment Counter value low 8-bits
    goto    Delay
    incfsz  Counter+1,F                 ; Increment Counter value high 8-bits
    goto    Delay
    retlw   0
;
main:
    movlw   0b11011111  ; Select TIMER0 clock source as FOSC/4
    option
    movlw   0b11111011  ; GP2 as output
    tris    GPIO
;
; Toggle GPIO bit 2
;
Loop:
    bsf     GP2         ; set port bit high
    call    Delay
    bcf     GP2         ; set port bit low
    call    Delay
    goto    Loop
;
; The PIC12F508 reset vector is the highest
; instruction word in the code space.
;
; This is used to load the WREG with the factory
; oscillator calibration value then  the program
; counter rollover to zero to start the code.
;
; This example code places a GOTO instruction here.
;
; WARNING:  Programming a real part with this code
;           will erase the oscillator calibration value
;           set when the part was manufactured.
;
    PSECT   ResetVec,class=CODE,delta=2
    global  ResetVector
ResetVector:
    goto    Start

    end     ResetVector





 
Build failed =(
 
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'F:/Google Drive/Projects/PIC Projects/PIC12F508/CW Sim.X'
make -f nbproject/Makefile-default.mk dist/default/production/CW_Sim.X.production.hex
make[2]: Entering directory 'F:/Google Drive/Projects/PIC Projects/PIC12F508/CW Sim.X'
"C:\Program Files\Microchip\xc8\v2.31\pic-as\bin\pic-as.exe" -mcpu=PIC12F508 -c \
-o build/default/production/main.o \
main.asm \
-msummary=+mem,-psect,-class,-hex,-file,-sha1,-sha256,-xml,-xmlfull -fmax-errors=20 -mwarn=0 -xassembler-with-cpp
"C:\Program Files\Microchip\xc8\v2.31\pic-as\bin\pic-as.exe" -mcpu=PIC12F508 build/default/production/main.o \
-o dist/default/production/CW_Sim.X.production.hex \
-msummary=+mem,-psect,-class,-hex,-file,-sha1,-sha256,-xml,-xmlfull -mcallgraph=std -mno-download-hex
main.asm:104:: error: (1356) fixup overflow referencing psect StartCode (0x1F2) into 1 byte at 0x3F8/0x2 -> 0x1FC (build/default/production/main.o 24/0x1A)
main.asm:106:: error: (1356) fixup overflow referencing psect StartCode (0x1F2) into 1 byte at 0x3FC/0x2 -> 0x1FE (build/default/production/main.o 24/0x1E)
make[2]: *** [dist/default/production/CW_Sim.X.production.hex] Error 1
(908) exit status = 1
make[1]: *** [.build-conf] Error 2
nbproject/Makefile-default.mk:126: recipe for target 'dist/default/production/CW_Sim.X.production.hex' failed
make: *** [.build-impl] Error 2
make[2]: Leaving directory 'F:/Google Drive/Projects/PIC Projects/PIC12F508/CW Sim.X'
nbproject/Makefile-default.mk:91: recipe for target '.build-conf' failed
make[1]: Leaving directory 'F:/Google Drive/Projects/PIC Projects/PIC12F508/CW Sim.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
 
 
 
BUILD FAILED (exit value 2, total time: 456ms)



Your build is failing because you either did not read or did not understand these comments:

 
; Add this line in the project properties box "pic-as Global Options -> Additional options":
;
;   -Wa,-a -Wl,-DCODE=2,-pStartCode=0h,-pResetVec=01ffh

 
The pic-as tool chain WILL NOT BUILD THIS EXAMPLE until you do this.
 
Remember this is a comment line so DO NOT INCLUDE THE SEMICOLON.
 
#9
cdoc83
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2021/01/25 11:41:49
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/26 11:43:46 (permalink)
+1 (1)
 
Your build is failing because you either did not read or did not understand these comments

 
100% right =)  First of all, thank you for being so kind!  I only had a moment to drop it in and try it this morning and absolutely did miss the comment.  
 
Second.... IT WORKS!!!!  Thanks so much!  Now I need to learn about all this stuff.  Is there a good resource out there specifically for pic-as (I have multiple now-useless books on MPASM)?  What do those additional options do?  Is there any tutorials out there to learn what the pic-as compiler requires?  The PSECT stuff is completely foreign to me.  I've read through a few of the PDF's from microchips but it's way over my head.  Looking for a 101 type instruction.
 
Finally, thank you so much!  These microcontrollers kind of drive me crazy how difficult they are compared to getting started with Arduino's.  I realize Arduino's obfuscate much of the difficult bits at the expense of bloated code, but it also doesn't take half a day and resorting to posting to figure it out.  I've been a software engineer for 22 years and I've never had such a hard time learning a new skill.  This stuff makes C programming feel easy.  So, seriously, thank you for taking the time to drop some knowledge on me!  
 
post edited by cdoc83 - 2021/01/26 11:54:01
#10
dan1138
Super Member
  • Total Posts : 4242
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/26 13:46:47 (permalink)
+1 (1)
@cdoc83,
 
Microchip killed off the assembler and its syntax that has be standard for 30 years.
 
Just this morning MPLABX has become unstable with the pic-as(v2.31) tool chain for me.
 
They must be out to punish you, that is you personally, for using assembly language. :)
 
I better start looking for little red sniper dots.
(Being paranoid does not mean that they are not out to get me too. :)
#11
lakis70
Starting Member
  • Total Posts : 33
  • Reward points : 0
  • Joined: 2021/01/13 17:08:32
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/26 18:08:08 (permalink)
-1 (1)
you can try the free greatcowbasic gcb they have many ready functions
post edited by lakis70 - 2021/01/26 18:10:16
#12
dan1138
Super Member
  • Total Posts : 4242
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/26 22:00:40 (permalink)
+1 (1)
lakis70
you can try the free greatcowbasic gcb they have many ready functions

I am not sure how using a tool that translates from a high level language lile BASIC to Microchip MPASM assembly language is going to help someone with creating code for the Microchip pic-as(v2.xx) tool chain.
 
The Original Poster of this topic: https://www.microchip.com/forums/FindPost/1164162 could offer some insight perhaps.
#13
lakis70
Starting Member
  • Total Posts : 33
  • Reward points : 0
  • Joined: 2021/01/13 17:08:32
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/27 00:00:03 (permalink)
+1 (1)
the author said about arduino, so i suggest the basic for pic
#14
dan1138
Super Member
  • Total Posts : 4242
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/01/27 02:15:04 (permalink)
0
lakis70
the author said about arduino, so i suggest the basic for pic

The context that the Original Poster(OP) mentioned the Arduino was about how frustrating using the Microchip tools are when dealing with bare metal  coding. My own experience dates from a time before the internet when dead trees were used to store the information about computers. When programming was done with wires and bugs were actual physical insects caught in the contacts of an electromechanical relay.
 
The OP seems to want the experience getting the absolute most out of least capable hardware and tools. The PIC12F508 is perhaps the second most resource restricted controller Microchip offers. Only the PIC10F200 seems to have less.
#15
cdoc83
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2021/01/25 11:41:49
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/02/01 12:10:11 (permalink)
0
Okay guys, I decided to try to water down the code as much as possible... because I have no idea what some of the stuff does.  I added the option line from Dan's code, and it works!
 

PROCESSOR 12F508
#include <xc.inc>

CONFIG OSC = IntRC
CONFIG WDT = OFF
CONFIG MCLRE = OFF
CONFIG CP = OFF

psect code
org 0

init:
 movlw 0b11011111 ; Select TIMER0 clock source as FOSC/4
option
 movlw 0b11111011 ;gp2 as output
tris GPIO
bsf GP2 ; have also tried bsf GPIO, 2


loop:
goto loop

end

 
I'm kinda stoked I was so close... but at the same time feel like I'm skipping some important parts.  After trying to expand the code a bit, I added a call function bit, and it would no longer compile.  I then added Dan's additional options and it worked!  So... can someone explain what the options are doing, and why they are required? Here they are for reference:
 
; Add this line in the project properties box "pic-as Global Options -> Additional options":
;
; -Wa,-a -Wl,-DCODE=2,-pStartCode=0h,-pResetVec=01ffh
#16
ric
Super Member
  • Total Posts : 29870
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: Struggling with P12F580 "hello" program in assembly 2021/02/01 12:23:43 (permalink)
0
If that works, it may be due to good luck as you have removed a number of essential elements that Dan added.
I'll leave it to Dan to explain why they are there, but all the info is in the PIC-AS user guide. It is VERY different to MPASM, and requires a lot more input from the user, which it really could do itself.
 
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#17
dan1138
Super Member
  • Total Posts : 4242
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/02/01 19:04:22 (permalink)
+1 (1)
ric
I'll leave it to Dan to explain why they are there, but all the info is in the PIC-AS user guide.

This was hard enough for me to figure out on my own. Cdoc83 is just going to need to actually read the documentation like I did and study the working examples to find what I discovered. Most of what I do know has not been documented in any clear way by Microchip so I understand why cdoc83 would like clearly written comprehensive documentation that describes the pic-as(v2.xx) tool chain and how to use it. For my part I'm done doing Microchip's job for free. Mostly I've been piecing this together a few bits at a time, never sure if what I have is correct.
 
To cdoc83, you are on your own.
 
To ric, thanks for throwing me under the bus. :)
#18
ric
Super Member
  • Total Posts : 29870
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: Struggling with P12F580 "hello" program in assembly 2021/02/01 19:14:50 (permalink)
+1 (1)
dan1138
...
To ric, thanks for throwing me under the bus. :)

Anytime. :)
You've plainly put in the hard yards figuring out how the damn thing works.
I didn't want to post any misinformation that would undo your good work. ;)
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#19
cdoc83
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2021/01/25 11:41:49
  • Location: 0
  • Status: offline
Re: Struggling with P12F580 "hello" program in assembly 2021/02/02 09:04:02 (permalink)
0

To cdoc83, you are on your own.



Understood.  Thanks for your help, I really appreciate you getting me up and running!  I'll do my best to figure it out on my own from here.  
#20
Page: 12 > Showing page 1 of 2
Jump to:
© 2021 APG vNext Commercial Version 4.5