Hi guys,
I am very new to embedded systems and I have very little knowledges about them and electronics.
Recentrly I started to read a book(a little old) and I need some explanations about how the LEDs are illuminated because it didn't explain on the book.I use Pickit 1 flash starter kit, and a PIC16f684.
Here is the diagram of LEDs(from my Pickit 1 flash starter kit user's guide)
Here is the diagram from the old book:
The C code is here:
When I press the switch button the 0 and 7 LEDs are full lit and the 2 LED is lit but less then two others.
When I release the button, 3, 5 and 6 LEDs are illuminated with the same power.
So please if you can explain me why some LEDs are illuminated more than others or have the same power.I really want to learn embedded systems and I know I need electronics, but I believe that with your help I will succeed.
Thank you and excuse me for my english if it is bad.
I am very new to embedded systems and I have very little knowledges about them and electronics.
Recentrly I started to read a book(a little old) and I need some explanations about how the LEDs are illuminated because it didn't explain on the book.I use Pickit 1 flash starter kit, and a PIC16f684.
Here is the diagram of LEDs(from my Pickit 1 flash starter kit user's guide)
Here is the diagram from the old book:
The C code is here:
Rich (BB code):
#include<pic.h>
__CONFIG(INTIO & WDTDIS & PWRTEN & MCLRDIS & UNPROTECT & BORDIS & IESODIS & FCMDIS);
main()
{
PORTA = 0;
CMCON0 = 7;
ANSEL = 0;
TRISA = 0b001001;
while(1 == 1)
{
if(0 == RA3)
PORTA = 0b010010;
else
PORTA = 0b000100;
}
}
When I release the button, 3, 5 and 6 LEDs are illuminated with the same power.
So please if you can explain me why some LEDs are illuminated more than others or have the same power.I really want to learn embedded systems and I know I need electronics, but I believe that with your help I will succeed.
Thank you and excuse me for my english if it is bad.
Last edited by a moderator: