@ scoobystu, thanks I had just read and done their lesson 4 this afternoon.
@ ericgibbs, thanks, but the last thing I need right now is more software to understand
@ papabravo, I have read that on the web, or something similar
@ omar.m, you got it, the process is what I didn't understand, I have MPLAB, I can read the .asm I am also able to output it to HEX and load it into the chip, the commands within the code are for humans to understand, I do understand some of the lines of code, a few things I woukd like to know are.
Example:
in the above, is option_reg user defined or must it be used from the asm dictionary? the same with equ and the HEX number, what does it mean and how is it reached, as the same number can appear numerous times in the code.
Example:
Code:
;bank 0
indf equ 0x00 ;indirect file register
tmr0 equ 0x01 ;timer0 register
pcl equ 0x02 ;program counter - low byte
status equ 0x03 ;status register
fsr equ 0x04 ;file select register
porta equ 0x05 ;porta register
portb equ 0x06 ;portb register
reg_b equ 0x0c
reg_a equ 0x0d
And on a different script
#DEFINE PORTA 0005 ;PAGE 0
#DEFINE PORTB 0006 ;PAGE 0
What is needed at the start of a script, I have seen the above and items listed similar to the above, do they mean the same thing? I notice they both have porta as a 5 but why 0x05 + 0005 are they just different ways each script creator has chosen? again, as 0005 and 0x05 seem to mean the same, how are they reached? or what determines them
On some of the #DEFINE entries I see #DEFINE SWA1 (2, 3 & 4) in the same style following on below, can these be user defined or are they part o fthe asm dictionary, where can I find this info?
Is there any set order that splits the code into chunks or sections IE,
headers (containing processor 16f84a include <p16f84a.inc>)
DEFINE or settings piece (what determines this, are there MUST have components to go here)
Initialize PIC or preparing it for action (I noticed the clearing of ports or loading of registers etc, how do you determine this area, are there set entities that would have to be before any actual motor functions)
I am sure the penny will drop at some stage, thanks for the help so far.