| ??? 07/25/01 15:30 Read: times |
#13495 - RE: again_simple program for testing 8051 |
I was having similar problems when I made my first test circuit. I believe you problem is where you initialize the SP. I'm still very new as well and would like to know if this is correct.
I made a little program that responds to any pin on P1 going high. The corresponding pin on port 3 will light up the LED. I try initializing in this order: $MOD52 org 0h mov sp,030h ;init stack pointer org 0100h mov P1,000h ;clear P1 "inputs" LOOP: mov r0,P1 mov P3,r0 jmp LOOP; end All LEDs shoulod be off when you reset or start up. Just take a jumper from Vcc and hit any pin on P1 the LED on P3 should light up! Good luck! Brian |
| Topic | Author | Date |
| again_simple program for testing 8051 | 01/01/70 00:00 | |
| RE: again_simple program for testing 8051 | 01/01/70 00:00 | |
RE: again_simple program for testing 8051 | 01/01/70 00:00 |



