Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 29th June 2005, 12:12 PM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

Quote:
Originally Posted by Blueprint
Haha thanks... sod the LED's if they blow, they blow... Im screwed when it comes to choosing resistors, i got a lucky bag from Maplin, but i calculate all of them to be over 100mA which doesn't help seeing as i'm only using 3.5v to start with, all the other electronics and shizzle... I need a low mA resistor. It'll be ok.
This could be one of the problems? - you obviously have VERY little electronics knowledge - resistors are measured in ohms, NOT in mA.

Resistor values for LED's are not at all critical, and different values (within reason) will only alter the brightness.

I would suggest using something in the 'hundreds', anything over 100 ohms and under 1000 ohms should be fine, aim for about 470 ohms, which is yellow, violet, brown, gold (for a 5% resistor).

But DON'T connect the LED's without resistors, as well as killing the LED you could kill the PIC as well.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 29th June 2005, 05:36 PM   (permalink)
New Member
Blueprint is on a distinguished road
Default

Ok thanks for that advice. I did mean to say Ohms, but didnt realise it could damage the PIC. I've tested the PIC and it's still alive (thankfully!). All "resistored" up and raring to go, just gonna try and connect the rest now...

Wish me luck...
__________________
www.teamblueprint.com
expl0ring the r00t 0f y0ur b0x
Blueprint is offline   Reply With Quote
Old 29th June 2005, 06:09 PM   (permalink)
Experienced Member
 
Someone Electro is on a distinguished road
Send a message via AIM to Someone Electro Send a message via MSN to Someone Electro Send a message via Yahoo to Someone Electro
Default

an 220 Ohm resisor and it will run any LED (100 Ohm if you want them bright)

I put the crystal on the same row of the breadbord as the PICs OSC pin is. 32Khz is not much so it shodnt mess up whith long wires to much.

Im runing it 16Mhz and it runs no problem on an breadbord.

Do you have the PIC set to an low power oscilator or it may be overloading the crystal.

Awww the old obsolete PIC16F84.It has no internal oscilator.The new PICs have internal oscilators so i dosent need an crystal to run.And they will automaticly switch to the internal osc. if the crystal fails.

Did your write your program right?

btw:
Hope you didnt use an micrwave to burn your program on. lol :lol:
__________________
Il give you shocking experience.
Someone Electro is offline   Reply With Quote
Old 29th June 2005, 06:23 PM   (permalink)
New Member
Blueprint is on a distinguished road
Default

Haha, just sorting out my resistors now, i'm home. I'm actually using a PIC16F84A... I take it that doesnt have an internal oscilator?

I'm using the code from this site (and the wiring layout):

http://techref.massmind.org/techref/...pic/bincnt.htm

I'll look for a resistor between 220-100Ohms. Does it matter if I use four resistors (i.e. 4 x 100Ohm resistors = 400Ohms, therefore I should use weaker resistors...or?) I believe the diagram shows the resistors/LED's in parallel right? So the Ohms don't accumulate?

I'm laying it out exactly as in the diagram shown on the above site.

EDIT: No, i'm using a PIC programmer to program the chips... i'm not using the oven method for PICs.
__________________
www.teamblueprint.com
expl0ring the r00t 0f y0ur b0x
Blueprint is offline   Reply With Quote
Old 29th June 2005, 06:30 PM   (permalink)
Super Moderator
 
Jay.slovak is just really niceJay.slovak is just really niceJay.slovak is just really nice
Default

Quote:
Originally Posted by Blueprint
Haha, just sorting out my resistors now, i'm home. I'm actually using a PIC16F84A... I take it that doesnt have an internal oscilator?
No 16F84 is very old chip. When it was designed no PICs had internal oscilators

Quote:
I'll look for a resistor between 220-100Ohms. Does it matter if I use four resistors (i.e. 4 x 100Ohm resistors = 400Ohms, therefore I should use weaker resistors...or?) I believe the diagram shows the resistors/LED's in parallel right? So the Ohms don't accumulate?
100 ohms will be fine, do not lower it or you will burn the LEDs.
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline   Reply With Quote
Old 29th June 2005, 06:51 PM   (permalink)
New Member
Blueprint is on a distinguished road
Default

Quote:
I would suggest using something in the 'hundreds', anything over 100 ohms and under 1000 ohms
Ok this may sound stupid, but I have a pack of resistors... apparently "commonly used resistors". However, a few of them are below 100Ohms, whereas the rest all work our to be in their thousands i.e. 1000Ohms plus (1000Ohms = 1KOhm?). None lie between 100-1000Ohms. I'm going to list the colours of every one so you can see for yourself.

Green, White, Black, Red, Red
Green, Yellow, White, Black, Brown, Red
Green, Red, Brown, Gold
Brown, Black, Black, Red, Violet, Yellow
Red, Brown, Orange, Blue, Blue
Red, Violet, Red, Gold
Violet, Green, Gold
Red, Brown, Orange, Blue, Blue, Green (or pale Grey)
Yellow, Red, Black, Gold
Brown, Green, Black, Gold
Brown, Black, Red, Gold
Brown, White, Red, Gold, Brown
Brown (maybe Red), Grey, Yellow, Gold
Brown, Red, Brown, Green (or pale Grey), Blue
Yellow, Blue, Yellow, Brown, Violet, Yellow

That's all the resistors I have :roll:

Will any of those do?
__________________
www.teamblueprint.com
expl0ring the r00t 0f y0ur b0x
Blueprint is offline   Reply With Quote
Old 29th June 2005, 06:58 PM   (permalink)
Super Moderator
 
Jay.slovak is just really niceJay.slovak is just really niceJay.slovak is just really nice
Default

I am not in the mood to calculate comebody's resistors. Take this prog. to help you out.
Attached Files
File Type: xls resistorshop.rar.xls (206.5 KB, 147 views)
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline   Reply With Quote
Old 29th June 2005, 08:24 PM   (permalink)
New Member
Blueprint is on a distinguished road
Default

YES IT WORKS!!!!

http://www.teamblueprint.com/bb/yes.jpg

Thanks to all of you for your help! I feel so happy now

THANK YOU
__________________
www.teamblueprint.com
expl0ring the r00t 0f y0ur b0x
Blueprint is offline   Reply With Quote
Old 29th June 2005, 08:27 PM   (permalink)
Super Moderator
 
Jay.slovak is just really niceJay.slovak is just really niceJay.slovak is just really nice
Default

Quote:
Originally Posted by Blueprint
YES IT WORKS!!!!

http://www.teamblueprint.com/bb/yes.jpg

Thanks to all of you for your help! I feel so happy now

THANK YOU
No problem

Enjoy it :twisted:
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline   Reply With Quote
Old 29th June 2005, 08:30 PM   (permalink)
New Member
Blueprint is on a distinguished road
Default

lol... i have to chnge it now... add 4 more LED's and make it count in hours & minutes... at the moment it's only doing 4 LED's in seconds using this code:

Code:
;-----------------------------------------------------------------------;
; BINCNT.ASM         Counts in binary on LEDs ( RB0 - RB4 )             ;
;-----------------------------------------------------------------------;
;-----------------------------------------------------------------------;
;         The next 6 lines are directions to the assembler              ;
;-----------------------------------------------------------------------;
        LIST P=16F84           ;  tells which processor is used
        INCLUDE "p16f84.inc"   ;  defines various registers etc. Look it over.
        ERRORLEVEL -224        ;  supress annoying message because of tris
        __CONFIG _PWRTE_ON & _LP_OSC & _WDT_OFF   ;  configuration switches

          ORG 0              ; start a program memory location zero

;-----------------------------------------------------------------------;
;         First we set up all bits of PORT A and B as outputs           ;
;         and set bits in the OPTION register concerning TMR0           ;
;-----------------------------------------------------------------------;
         movlw B'00000000'    ; all bits low in W
         tris PORTA           ; contents of W copied to PORT A ...
         tris PORTB           ; and PORT B
         movlw B'00000100'    ; pull-ups active
                              ; prescalar assigned to TMR0 and set 1:32
         option               ; rolls over each second
 
;-----------------------------------------------------------------------;
;                      This is the main program                         ;
;-----------------------------------------------------------------------;
         clrf PORTB           ; start with zero
loop:
         incf PORTB, f        ; add 1 to port B
         btfss INTCON, T0IF   ; wait on T0IF to be set
         goto $ -1
         bcf INTCON, T0IF     ; clear the interrupt flag
         goto loop

         end                  ; end of program
Time to code some more! :twisted: :twisted: :twisted:
__________________
www.teamblueprint.com
expl0ring the r00t 0f y0ur b0x
Blueprint is offline   Reply With Quote
Old 30th June 2005, 05:42 AM   (permalink)
Experienced Member
 
Someone Electro is on a distinguished road
Send a message via AIM to Someone Electro Send a message via MSN to Someone Electro Send a message via Yahoo to Someone Electro
Default

Just make the loop go trugh more times (Watch out for overflow)

What did you do to get it working ? (im just curius)

I wod recomend you geting an newer beter PIC MCU since this one is so old they dont make them anymore and modern PICs are even cheaper.

Take a look at www.microchip.com
You can browse there products whith datasheets(PICs,dsPICs, serial EEPROMs,some analog stuf...) buy them or order free samples.

And watch out to order them in PDIP pakeges or it wont fit on your breadbord.

Welcome in the microcontroler world.

btw: Isnt your website ilegal? (Since its about coputer hacking and has links to hacking tools)

That whith the microwave was a joke. (if you did it in 1 ms it wod be completly fryed)
__________________
Il give you shocking experience.
Someone Electro is offline   Reply With Quote
Old 30th June 2005, 08:38 AM   (permalink)
New Member
Blueprint is on a distinguished road
Default

1. Did you read the disclaimer? If not then you went against my rules and I could take you to court (but i'm not going to!!!) LOL.

2. To get the design working, I simply re-built the whole design, but this time I put VDD to positive. It was on negative, which confused me before!. I also put on a few 1K resistors... going to buy some better ones today (i.e. ones ranging from about 25Ohms - 5K).

3. What PICs would you recommend I buy now?
__________________
www.teamblueprint.com
expl0ring the r00t 0f y0ur b0x
Blueprint is offline   Reply With Quote
Old 30th June 2005, 08:44 AM   (permalink)
Super Moderator
 
Jay.slovak is just really niceJay.slovak is just really niceJay.slovak is just really nice
Default

Quote:
Originally Posted by Blueprint
1. Did you read the disclaimer? If not then you went against my rules and I could take you to court (but i'm not going to!!!) LOL.

2. To get the design working, I simply re-built the whole design, but this time I put VDD to positive. It was on negative, which confused me before!. I also put on a few 1K resistors... going to buy some better ones today (i.e. ones ranging from about 25Ohms - 5K).

3. What PICs would you recommend I buy now?
Maybe 16F628 (most tutorials on Internet) or 16F88 (better, has A2D, better oscilator...). It depends...
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline   Reply With Quote
Old 30th June 2005, 08:46 AM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

Quote:
Originally Posted by Blueprint
3. What PICs would you recommend I buy now?
I would suggest you consult my PIC tutorials, the PIC's used there were chosen after considerable deliberation as a good place to start with 16F series PIC's.

But for a start, as most of my tutorials use, I would suggest the 16F628, the device that replaced the 16F84 last century!. Following on from that the 28 pin 16F876 or 40 pin 16F877 are the obvious next step, or for small devices the 8 pin 12F675.

There are a number of devices now that enhance the 16F628, such as the 16F819 and 16F88 - but their extra facilities may only confuse at first.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 30th June 2005, 09:47 AM   (permalink)
Experienced Member
 
Someone Electro is on a distinguished road
Send a message via AIM to Someone Electro Send a message via MSN to Someone Electro Send a message via Yahoo to Someone Electro
Default

yea the F628 or the F88 (The F88 has comparitors and ADC and you will have horible problmes if you use the PORTA as digital and have the analog enabled)

Wen making robots PWM is a must to have feture.


If you go in making somting complex you may want to use some high level progaming languages.MikroBasic and mikroC is realy easy to learn (If you alredy know basic-visual basic or C-C++...Its a even more easy)

In mikroBasic your progoram wod be:
-------------------------------------------------
dim i as byte
main:
TIRSB = &11111111
PORTB = 0

count:
If i = %00001111 then
i = 0
end.
i = i + 1
PORTB = i
Delay_ms(1000)
goto count

end
-------------------------------------------------
__________________
Il give you shocking experience.
Someone Electro is offline   Reply With Quote
Reply

Bookmarks

« I2C | Frustration »
Thread Tools
Display Modes




All times are GMT. The time now is 02:30 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.