0 Members and 1 Guest are viewing this topic.
Code: [Select]void delay(int a){ int i; for(i=0;i<a;i++); //null statement}
void delay(int a){ int i; for(i=0;i<a;i++); //null statement}
Quirks about 8051 family in 20pin packages - port p1.0 and p1.1 is kind of open collector - those 2 pins are connected to internal analouge comparator and cannot source current. This should not be an issue here but you may try to move to some other pins.And if you are unsure about your programing try to test your circut using Bascom 8051 or even assembly language. At least for me those two are easier than C for 8051 family.
I agree. Not programmed.Easiest "is it programmed" check IMHO is to program it with a simple infinite loop toggling a pin. Don't even bother with timing, you don't want to check if that's right too, you just want the pin to toggle. Add a pullup if required and toss a scope probe at it. Even better, toggle all the pins.
Not exactly, that contains LJMP 082F followed by a ton of MOV R7, A.
What i didn't really got, why you loading two hex files into programmer?
The only thing I see is the missing 'v' at the "use On-chip ROM". That could make the difference.
MODULE: Code.obj (CODE)*** ERROR L120: CONTENT BELONGS TO ERRONEOUS SEGMENT SEGMENT: ?PR?_DELAY?CODE MODULE: Code.obj (CODE)Program Size: data=9.0 xdata=0 code=69Target not created
* * * * * * * D A T A M E M O R Y * * * * * * * REG 0000H 0008H ABSOLUTE "REG BANK 0" IDATA 0008H 0001H UNIT ?STACK * * * * * * * C O D E M E M O R Y * * * * * * * CODE 0000H 0003H ABSOLUTE 0003H 07FDH *** GAP *** CODE 0800H 0018H INBLOCK ?PR?_DELAY?CODE CODE 0818H 0014H INBLOCK ?PR?MAIN?CODE CODE 082CH 000CH UNIT ?C_C51STARTUP CODE 0838H 000AH INBLOCK ?PR?CCT_INIT?CODE