In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: One big gotcha is the mode values. For the SX28 the registers are write-only (you cannot read them back). On the SX48 you can read them back. BUT the mode value to WRITE to a register on the SX28 will READ the register on the SX48. For example MODE $0F on the sx28 will WRITE to the TRIS registers, but on the SX48 $0F will READ from the TRIS registers. On the SX48 you must use $1F to WRITE to the TRIS registers. So... SX28 Code MODE $0F Must be translated into SX48 Code: MOV W,#$1F MOV M,W Now another side affect is that the code on the SX48 mangles the W register, where the code on the SX28 leaves it alone. Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=114254#m114368 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)