![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
I keep getting: Message[302] K:\CODE\BLINKER\BLINKER 16F84A.ASM 23 : Register in operand not in bank 0. Ensure that bank bits are correct. the program is as follows: Code: ;Declarations and microcontroller configuration PROCESSOR 16f84 #include "p16f84A.inc" __CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC ; Declaration of variables cblock 0x20 ;start of general purpose registers count1 ;used in delay routine counta ;used in delay routine countb ;used in delay routine endc org 0x0000 ;org sets the origin, 0x0000 for the 16F628, ;this is where the program starts running bsf STATUS, RP0 ;select bank 1 movlw b'00000000' ;set PortB all outputs movwf TRISB movwf TRISA ;set PortA all outputs bcf STATUS, RP0 ;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 call Delay ;this waits for a while! movlw 0x00 movwf PORTA movwf PORTB ;set all bits off call Delay goto Loop ;go back and do it again Delay movlw d'250' ;delay 250 ms (4 MHz clock) movwf count1 d1 movlw 0xC7 movwf counta movlw 0x01 movwf countb Delay_0 decfsz counta, f goto $+2 decfsz countb, f goto Delay_0 decfsz count1 ,f goto d1 retlw 0x00 end
__________________ I AM the exeption that disproves the rule in many ways but the rules still apply (unfortunately) www.simonsphotography.org.uk/ - My other hobby www.rushdenrotaract.org.uk/ - make a difference and have fun ! Never buy "Trust" products, all mine broke !!! | |
| |
| | #2 |
|
hi TC Just add this line in the header of your program. Just under the #include....errorlevel -302, -207
__________________ Eric " Good enough is Perfect " I will NOT answer PM's requesting technical help, please use the Forum PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 22nd June 2008 at 12:40 PM. | |
| |
| | #3 |
|
ok so what does it do ? is the error really a problem ? or just a warning the program does not seem to work in any case
__________________ I AM the exeption that disproves the rule in many ways but the rules still apply (unfortunately) www.simonsphotography.org.uk/ - My other hobby www.rushdenrotaract.org.uk/ - make a difference and have fun ! Never buy "Trust" products, all mine broke !!! | |
| |
| | #4 |
|
That is NOT an error. Is just information passed to you. It simply tells that something is going on.
__________________ Agustín Tomás In theory, there is no difference between theory and practice. In practice, however, there is. | |
| |
| | #5 |
|
ok well the program does not work anyhow
__________________ I AM the exeption that disproves the rule in many ways but the rules still apply (unfortunately) www.simonsphotography.org.uk/ - My other hobby www.rushdenrotaract.org.uk/ - make a difference and have fun ! Never buy "Trust" products, all mine broke !!! | |
| |
| | #6 |
|
Well, it should. Have you got a crystal correctly wired up and MCLR connected to Vdd via a resistor? Mike. | |
| |
| | #7 |
| hi TC, Made some minor changes, marked with ++++ symbols. It works OK in the PIC simulator, PORTA & B On/Off/On....
__________________ Eric " Good enough is Perfect " I will NOT answer PM's requesting technical help, please use the Forum PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 7th July 2008 at 12:26 PM. | |
| |
| | #8 |
| pommie it don't need a crystal basically its nigels 1.2 tutorial code pasted into a basic 18F84A setup i was just trying to fool around.
__________________ I AM the exeption that disproves the rule in many ways but the rules still apply (unfortunately) www.simonsphotography.org.uk/ - My other hobby www.rushdenrotaract.org.uk/ - make a difference and have fun ! Never buy "Trust" products, all mine broke !!! | |
| |
| | #9 |
| thanks eric I'll give it a go later (just got to prepare another wall wart for breadboard use the last one went caput for no reason)
__________________ I AM the exeption that disproves the rule in many ways but the rules still apply (unfortunately) www.simonsphotography.org.uk/ - My other hobby www.rushdenrotaract.org.uk/ - make a difference and have fun ! Never buy "Trust" products, all mine broke !!! | |
| |
| | #10 |
| | |
| |
| | #11 | |
| Quote:
But you shouldn't be using the 16F84, it was replaced last century by the 16F628, which is much higher spec and cheaper. | ||
| |
| | #12 |
| The 628 is also obsolete. Replaced by the 628A. The PICkit 2 won't program the 628, but it will program the 628A.
__________________ ========================= Futz's Microcontrollers & Robotics ========================= | |
| |
| | #13 |
|
And the 628A is obsolete, replaced by the 16F88. etc. ![]() Mike. | |
| |
| | #14 |
| Except MicroChip never released a migration document from the 628 to the 88, nor have ever listed the 628A as obselete and not recommended for new projects, as they did for the 84A way back in the last century. The 84 is the PIC equivilent of the 741, an old obselete expensive device, that people still seem to keep using for some silly reason. I think the worst thing MicroChip did was re-release the 84A, I can see their point, why not sell a cheaper device for more money than more expensive ones - but it stikes me as a very shoddy practice. | |
| |
| | #15 | |
| Quote:
I'm trying to use the 16F88 as my starter pic but trying to get sample code for it is a joke,
__________________ I AM the exeption that disproves the rule in many ways but the rules still apply (unfortunately) www.simonsphotography.org.uk/ - My other hobby www.rushdenrotaract.org.uk/ - make a difference and have fun ! Never buy "Trust" products, all mine broke !!! | ||
| |
|
| Tags |
| 302, error |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| PIC error. | apple9 | Micro Controllers | 1 | 6th April 2008 10:01 AM |
| Pspice LED Error | kogula14 | Electronic Projects Design/Ideas/Reviews | 3 | 14th March 2007 05:03 AM |
| PCB error | Electronics4you | General Electronics Chat | 4 | 20th October 2006 09:29 PM |
| Error 302 | Six-Sixteen | Micro Controllers | 7 | 17th February 2004 05:07 PM |
| Need Assistance , Another Verify Error At OOOOh! Error | MindShaper | Micro Controllers | 0 | 4th September 2003 03:05 PM |