![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I have the below code: --------------------------------------------------- trisabuf VAR BYTE movlw 0x10 ; 00010000 - RA4 is entry movwf trisabuf --------------------------------------------------- bsf trisabuf,3 movf trisabuf,W tris PORTA ---------------------------------------------------- What mean : tris PORTA ; This mean that PORTA = trisabuf ; Last edited by savnik; 15th February 2007 at 06:28 AM. | |
| |
| | (permalink) |
| On older versions of the PIC architecture there was a specific instruction that loaded the the TRIS register. On the newer versions you use a move instruction just like every other file register. If you read the datasheets really carefully they discourage the use of the dedicated instruction in favor of the more generic move instruction Last edited by Papabravo; 15th February 2007 at 10:47 PM. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
Code: BSF PORTA,3 | ||
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| I found: bcf _trisabuf,3 bsf STATUS, RP0 movf _trisabuf,W movwf TRISA bcf STATUS, RP0 I use for pic16f628a | |
| |
| | (permalink) | |
| Quote:
Code: bsf STATUS, RP0 bcf TRISA, 3 bcf STATUS, RP0 | ||
| |
| | (permalink) |
| You are right Thank you | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Problem with LCD code? | spondootre | Micro Controllers | 15 | 29th April 2008 10:15 AM |
| Help me with code for electronic switch pls | x-land | Micro Controllers | 10 | 15th July 2006 05:37 PM |
| Delay routine not working | gregmcc | Micro Controllers | 6 | 18th September 2005 06:23 PM |
| chek code assembler | gimmy | Electronic Projects Design/Ideas/Reviews | 10 | 4th May 2005 07:32 PM |
| weird PORTA | gastonanthony | Micro Controllers | 6 | 30th April 2005 11:46 AM |