Roman, I haven't checked all the EQU's but the GPIO (0x05h) and TRISIO (0x85h) are correct. I'm new at PICs and trying to understand someone else's uncommented code obtained by disassembling the hex source (this is worse than a jig saw puzzle - no colors to give clues!). I have programmed the 12c671 but RS232 is not working. The OSCCAL value was programmed incorrectly so that may be a major factor why it doesn't work. Thanks for your interest. Jess 00008 ; RAM Page 0 Registers 00009 ; 00000004 00014 FSR EQU 0x0004 00000005 00015 GPIO EQU 0x0005 0000000A 00016 PCLATH EQU 0x000A 00021 ; 00022 ; RAM Page 1 Registers 00023 ; 00000081 00024 OPTION_REG EQU 0x0081 00000085 00025 TRISIO EQU 0x0085 0000008C 00026 PIE1 EQU 0x008C -----Original Message----- From: Roman Black To: PICLIST@MITVMA.MIT.EDU Date: Sunday, March 04, 2001 11:32 PM Subject: Re: [PIC]: 12c671 - GPIO vs TRIS Reg >Hi Jess, is it possible your include file is >corrupted, or you have linked the wrong include file? >-Roman > > >Jess Hancock wrote: >> >> Thanks Bob and Drew for your responses. >> >> Bob, the documentation indicates the GPIO/TRIS registers are at register >> memory locations 0x05/0x85 and therefore it seems the disassembler should >> know which register is being addressed. To test, I modified the source code >> below by substituting TRISIO for the first GPIO and then assembled it and >> got the following hex code and Message[302]. Excerpts from POLARMD2.LST: >> >> 0019 3008 00135 ad0019 MOVLW 0x08 >> 001A 00A1 00136 MOVWF 0x21 >> 001B 1683 00137 BSF STATUS,RP0 >> Message[302]: Register in operand not in bank 0. Ensure that bank bits are >> correct. >> 001C 1205 00138 BCF TRISIO,4 ; ??? RAM >> Page TRISIO,4 >> 001D 1283 00139 BCF STATUS,RP0 >> 001E 1605 00140 BSF GPIO,4 ; ??? RAM >> Page TRISIO,4 >> 001F 17A1 00141 BSF 0x21,7 >> 0020 282E 00142 GOTO ad002E >> 00143 ; >> 0021 13A1 00144 ad0021 BCF 0x21,7 >> 0022 0CA7 00145 ad0022 RRF 0x27,f >> 0023 1803 00146 BTFSC STATUS,C >> 0024 1205 00147 BCF GPIO,4 ; ??? RAM > >-- >http://www.piclist.com hint: The list server can filter out subtopics >(like ads or off topics) for you. See http://www.piclist.com/#topics > > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics