Shop OBEX P1 Docs P2 Docs Learn Events
Will pic code work in SX Chip — Parallax Forums

Will pic code work in SX Chip

datacpsdatacps Posts: 139
edited 2007-07-16 05:57 in General Discussion
······· I lost the papers on a code I had done back a few years. I have the floppy I use to use to program the PIC16C711. It is a This is back in 97 when I had to put the chips on a programmer board. I would like to use the SX Chip from now on. I have a disassembly program and I converted it to assembly code. I know exactly what the program does but I don't know assembly.·

········ Is there a way to make it into a SX-B code and can I also program the SX Chip using the assembly code. I would have to edit a lot of it but will it work in the SX-chip.· The bottom line is I would like to redo the code in SX/B so I can add more features to it.

The code looks like this now after I used the disassembler program,,
(It looks like·Aliens wrote it)
············ ORG·00000H
;
············· DFB·010H,028H······· ;0000·10 28··;
··············· ORG·00008H
;
L0008:···· INC·R2···;0008·0A···.
············ ADD·A,R1···;0009·29···)
;
············· ORG·00020H
;mad.gif·············· MOVC·A,@A+PC······· ·;0020·83···.
··············LCALL·L1F30············ ·;0021·12 1F 30··..0
············· MOV·TL1,000H······ ·· ·;0024·85 00 8B··...
··············AJMP·L009F········ ··· ;0027·01 9F···..
;
L0029:···AJMP·L0084·············;0029·01 84···..
;
··········· JNB·SM1,L002E··········· ;002B·30 9E 00··0..
;
L002E:·· XRL·A,#000H············· ·;002E·64 00···d.
;
L0030:· ·MOVC·A,@A+PC········· ;0030·83···.
··········· DEC·@R0················· ·;0031·16···.
··········· NOP························· ;0032·00···.
··········· JNB·P0.1,L0036·········· ;0033·30 81 00··0..
;

Comments

  • Kevin WoodKevin Wood Posts: 1,266
    edited 2007-07-16 00:39
    You would probably be better off simply recreating the program's funtionality in SX/B.

    In other words, rewrite it instead of messing around with converting it.

    If you can give a description of what the program needs to do, somebody can help you get started.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-07-16 01:10
    If you're conversant in PIC assembly, you should be able to convert your program to SX assembly code. The main catch is that PIC16C7xx micros employ more instruction options than the PIC16C5xx micros that the SX is compatible with. Also, you may need to convert the Microchip (i.e. unreadable) mnemonics to Parallax mnemonics to get your program to assemble for the SX. (I can't remember if the SX assembler accepts Microchip mnemonics or not.)

    -Phil
  • Capt. QuirkCapt. Quirk Posts: 872
    edited 2007-07-16 05:57
    sxlist.com has a PIC assembly to SX assembly converter
Sign In or Register to comment.