This should be 100% compatible with your code. Well, at least 99%.
I did notice that it would not compile with my mpasm. They use a variable called CONFIG, and this is in the first column. Mpasm does not like this. So I renamed it SETTINGS, and it compiles fine. Should operate fine too, but you will have to check that out.
Code:
LIST P=12F508 ; target processor
#include "P12F508.INC" ; include Header file
__CONFIG _CP_OFF & _WDT_OFF & _MCLRE_OFF & _IntRC_OSC
;******************************************************
MYADRESS equ 0x44 ; DECODER ADDRESS because there is no EEPROM yet
;******************************************************
; RAM locations
SETTINGS equ 0x07 ; Contains various bits to test
MOTMASK equ 0x08 ; Motormask for direction
PWM equ 0x09 ; How long is motor on
PRECOUNT equ 0x0B ; Preamble counter
STATE equ 0x0C ; Where are we in the DCC package
DATA1 equ 0X0D ; First transm. byte
DATA2 equ 0x0E ; Second trans. byte
DATA3 equ 0x0F ; Third transm. byte
DATA5 equ 0x10 ; Scratch Register
SAMPLES equ 0x11 ; How many samples taken for one or zero
DAT2OLD equ 0x12 ; Save previous DATA to compare
;******************************************************
http://www.scalerobotics.com
Bookmarks