![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | Thread Tools | Display Modes |
| | (permalink) | |
| Super Moderator | Quote:
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. | |
| | |
| | (permalink) |
| New Member | 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... |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| | (permalink) |
| New Member | 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. |
| | |
| | (permalink) | ||
| Super Moderator | Quote:
Quote:
__________________ "I share, thus I am" Jay.slovak Read this! ICD2 Clone Best PIC/DsPIC Bootloader Read my Inchworm ICD2 review! | ||
| | |
| | (permalink) | |
| New Member | Quote:
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? | |
| | |
| | (permalink) |
| Super Moderator | I am not in the mood to calculate comebody's resistors. Take this prog. to help you out.
__________________ "I share, thus I am" Jay.slovak Read this! ICD2 Clone Best PIC/DsPIC Bootloader Read my Inchworm ICD2 review! |
| | |
| | (permalink) |
| New Member | 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 |
| | |
| | (permalink) | |
| Super Moderator | Quote:
Enjoy it :twisted:
__________________ "I share, thus I am" Jay.slovak Read this! ICD2 Clone Best PIC/DsPIC Bootloader Read my Inchworm ICD2 review! | |
| | |
| | (permalink) |
| New Member | 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 |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| | (permalink) |
| New Member | 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? |
| | |
| | (permalink) | |
| Super Moderator | Quote:
__________________ "I share, thus I am" Jay.slovak Read this! ICD2 Clone Best PIC/DsPIC Bootloader Read my Inchworm ICD2 review! | |
| | |
| | (permalink) | |
| Super Moderator | Quote:
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. | |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |