Author Topic: Is it possible that the 12F683 code will work on the 12F1822?  (Read 1696 times)

Offline SethMods

  • Registered BST
  • King of the Wii-tards
  • *
  • Posts: 189
  • Post quality +17/-1
  • Gender: Male
  • Acidmods User
Recently I decided to move from the 12F683 to the 12F1822 which has more features and costs less.

As I am updating the compiler that I made for the 12F683 I am noticing that the instruction set for the 12F683 seems to be a subset of the instruction set for the 12F1822. Not just in name(because obviously it's assembly) but in the binary (machine language) as well.

Can anyone speak to whether or not existing 12F683 code might work on a 12F1822?


EDIT: No such luck! Even though the instruction set seems to be the same the memory organization is vastly different. Instead of just two memory banks the 12F1822 has 32. In the 12F683 banks were selected using two bits in the STATUS register. Now it seems addresses accessed indirectly using an INDFx register and a pair of FSRxL and FSRxH registers.
« Last Edit: July 04, 2012, 08:48:16 AM by SethMods »

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.5 © 2008-2012, SimplePortal