![]() | ![]() | ![]() |
| | |||||||
| 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) |
| STATUS equ 03h PORTA equ 05h PORTB equ 06h TRISA equ 85h TRISB equ 86h org 0x0000 ;org sets the origin, 0x0000 for the 16F628, bsf STATUS, 5 ;select bank 1 movlw b'00000000' ;set PortB all outputs movwf TRISB movwf TRISA ;set PortA all outputs bcf STATUS, 5 ;select bank 0 Loop movlw 0xff movwf PORTA ;set all bits on movwf PORTB nop ;the nop's make up the time taken by the goto nop ;giving a square wave output movlw 0x00 movwf PORTA movwf PORTB ;set all bits off goto Loop ;go back and do it again end This is one of the codes I am just using to try and get the stupid thing to compile something, none of mine work after I use the MOVWF command. This is a modified version of one of Nigels codes off of his website, I figured it should work since its a tutorial but it won't even compile. Heres the eror message: MPLINK 4.11, Linker Copyright (c) 2007 Microchip Technology Inc. Error - section '.org_0' can not fit the absolute section. Section '.org_0' start=0x00000000, length=0x0000001c Errors : 1 Its something to do with the linking but I can't figure it out, if someone could tell me why it keeps returning this error it would be much appreciated. | |
| |
| | (permalink) |
| The program has been assembled succesfully with MPASM. I've added the list and __config directives (you may change those settings) | |
| |
| | (permalink) |
| Remove the linker file from your project and it will compile correctly. Mike. | |
| |
| | (permalink) |
| Thanks I appreciate the help. I'll probably have some more noob questions to ask after I start reading some more haha. Thanks again | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Picstart+ Troubles | freeskier89 | Micro Controllers | 6 | 16th April 2006 09:01 AM |
| initilisation troubles | Lilikin | Micro Controllers | 0 | 22nd March 2006 05:49 PM |
| Diode troubles | Kloth | General Electronics Chat | 12 | 14th February 2006 05:20 PM |
| Telephone troubles Verizon is clueless:( | Bob Haller | General Electronics Chat | 0 | 8th March 2004 10:53 PM |
| SimuLink and RTW compiling custom S-function | Styx | General Electronics Chat | 0 | 25th February 2004 03:51 PM |