Richard S wrote : > Jan-Erik: > I tried to find the information in the datasheet (yes I found > the datasheet :-) Which data sheet ? The number at the bottom of each page... > I also set to US-ASCII hope its better > now thanks for that info. Now TRISA seems to be what is in > the data sheet but OPTION_REG seems to be what is used in the > datasheet not OPTION. Well, "TRIS" and "OPTION" was two valid instructions some time ago. They are still used in your code below, and should be replaced with the MOVWF instruction. "TRISA", "TRISB" and "TRISB" as well as "OPTION_REG" are *registers* (SFR's). I think you mixed register names with instructions... > I assembled the program with > OPTION_REG and I get a warning since apparently the > p16f876.inc supplied with MPLAB does not have this referenced > in it but it does have the OPTION referenced and that is a > clean build. replace : tris PORTA tris PORTB tris PORTC with : MOVWF TRISA MOVWF TRISB MOVWF TRISC and : option with : MOVWF OPTION_REG Now, as I said, this is probably not your problem, but I think you shold change them anyway. That will make the code easier to read for us who never used the TRIS and OPTION instructions. > I tried both builds anyway and neither seem to > work. No, since you mixed up register names with instructions. > Now as you justly put it how do I know its not working. > What I mean is that after flashing the 16f876 with the hex > file the LED's do nothing. I then do a POR and still nothing. OK, just a quick check. From the "__CONFIG" statement in your code, your use the "low power osc" ("_LP_OSC"). What crystal are you using ? And have you ported the __CONFIG statement from the 16F84 to the 16F876 at all ? The __CONFIG statement seems pretty short for a 16F876... > You stated "Make sure that interrupts are disabled by > clearing the GIE flag. Proaby not the problem here either, > but anyway..." I did not do this yet as I am not up to the > level of such things yet. Yes, that's why you should make sure that GIE is cleared, since you don't use interrupts ! Now, I think that GIE should be cleared from POR, but just to be sure... > I am still learning by getting > somethiong done by someone else running first and go from > there. This is the first assembly project I tried Part of the problem is that it's a porting effort at the same time. The original code was for a 16F84, right ? Whoever wrote that could have left things in there POR-state. And newer processors have a lot of new stuff that might play a role here, like the parameters to the __CONFIG statement. > > Alex: > On p149 It has a number at the bottom > the specification states for DC operation that any > I/O pin can source or sink 25mA and the maximum total current > is 200 mA all ports. Page 149 ??? What data sheet are you using ? I have the latest data sheet for both 16F876 (DS30292C) and 16F876A (DS30292C, and none of them have anything about that on page 149... Regards Jan-Erik. -- 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