![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
Hey guys im looking for a solution here. I have a small project i want to do. It will require the control of 2 transistors and 1 button. So i need a minimum of 3-4 i/o pins. i would like to use a 8pin package (DIP or SOIC). I need it to run off of 2 AA batteries. I need to have it with a internal OSC to insure part count is low. And thoughts? Thanks for taking the time to at least read this
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #2 |
|
12F629 would be my choice, or 12F683 if you need 8Mhz clock/ADC/CCP/comparator/Timer2/more memory
| |
| |
| | #3 |
|
would the internal osc work ok off of 2AA
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #4 |
|
The 12F629 is 2V to 5V should be fine off two AA.
| |
| |
| | #5 |
|
ok cool i noticed it on page 114 oof datasheet
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #6 |
|
Thanks i just ordered 3 of these. Thanks a bunch again. I havent been on these for a while but what can i use to program these except asm? Is there a Basic or C i can use for 12F pics?
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #7 |
| | |
| |
| | #8 |
|
Great Cow Basic (GCBasic), blinks an led (and?) for 10f's too.
| |
| |
| | #9 |
|
Man you're fast. I didn't have time to pass along my recommendations. Anyway, you've four four choices; 12F629, 12F635, 12F675, and 12F683. The 12F635 and 12F683 have an 8 MHz INTOSC. The 12F683 is my favorite because it's pretty much "full blown" as far as 2K memory space, full compliment of timers, CCP module, etc. Almost forgot. You've got to look into BoostC for the 12F/16F parts. Good luck. Mike Last edited by Mike, K8LH; 24th April 2009 at 11:07 PM. | |
| |
| | #10 |
|
ok trying some asm right now .. no errors. but hard to test since its so fast lol: Code: list p=16f627A ; list directive to define processor #include <p16F627A.inc> ; processor specific variable definitions errorlevel -302 ; suppress message 302 from list file __CONFIG _CP_OFF & _DATA_CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_OFF & _WDT_OFF & _PWRTE_ON & _INTOSC_OSC_NOCLKOUT ;***** VARIABLE DEFINITIONS d1 EQU 0x7E ; variable used for context saving d2 EQU 0x7F ; variable used for context saving ORG 0x000 ; processor reset vector BSF PCON, 3 MOVLW 0x07 ;Turn comparators off and MOVWF CMCON ;enable pins for I/O BCF STATUS, RP0 ; BCF PORTB, 7 ;01pp pppp 11pp pppp BSF STATUS, RP0 ; BCF TRISB, 7 ;10pp pppp 11pp pppp BCF TRISB, 6 ;10pp pppp 10pp pppp main BSF PORTB,0 call Delay BCF PORTB,0 call Delay goto main ;loop forever, remove this instruction, for test only Delay movlw 0x5e ;0x3E movwf d1 movlw 0xeb ;0x9D movwf d2 Delay_0 decfsz d1, f goto $+2 decfsz d2, f goto Delay_0 goto $+1 nop return END
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 25th April 2009 at 02:26 AM. | |
| |
| | #11 |
|
BoostC is awesome also! Code: #include <system.h>
#pragma DATA _CONFIG, _CP_OFF & _PWRTE_OFF & _WDT_OFF & _INTRC_OSC_NOCLKOUT & _LVP_OFF
#pragma CLOCK_FREQ 4000000
void main()
{
char t = 150;
cmcon = 0x07;
pcon.OSCF = 1;
trisb = 0x00;
while(1){
set_bit( portb, 0 );
delay_ms(t);
clear_bit( portb, 0 );
delay_ms(t);
}
}
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #12 |
|
Cow Basic is wierd lol i changed or created a new compile bat to make it simpler: Code: @ECHO OFF E: cd \PROGRA~1\GCBASIC GCBASIC /NC %1 /O:%1.asm PAUSE Then u would use mplab to load it i assume.
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #13 |
|
ok issue here. Im trying ASM again but for a 10F206. I think i got the power and connection ok since it programs correctly but this code doesnt blink a led for some reason: Code: list p=10F206 ; list directive to define processor #include <p10F206.inc> ; processor specific variable definitions __CONFIG _IntRC_OSC & _MCLRE_ON & _CP_OFF & _WDT_OFF d1 equ 8 d2 equ 9 ORG 0x000 movwf OSCCAL ; update register with factory cal value start movlw 0x00 TRIS GPIO MAIN bsf GPIO,2 call Delay300ms bcf GPIO,2 call Delay300ms goto MAIN Delay300ms movlw 0x5E movwf d1 movlw 0xEB movwf d2 Delay_0 decfsz d1, f goto $+2 decfsz d2, f goto Delay_0 goto $+1 nop retlw 0 END
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #14 |
|
The 10F206 has a comparator module that is enabled at reset. You need to turn it off to use GP2 as digital I/O Edit: although according to the datasheet the output isn't enabled on GP2 at reset Just tested the code you posted using the Oshonsoft PIC10F simulator and it toggles GP2 correctly Last edited by geko; 25th April 2009 at 03:37 PM. | |
| |
| | #15 |
|
not working still Code: list p=10F206 ; list directive to define processor #include <p10F206.inc> ; processor specific variable definitions __CONFIG _IntRC_OSC & _MCLRE_ON & _CP_OFF & _WDT_OFF d1 equ 8 d2 equ 9 ORG 0x000 movwf OSCCAL ; update register with factory cal value start movlw 7 movwf CMCON0 movlw 0x00 TRIS GPIO MAIN bsf GPIO,2 call Delay300ms bcf GPIO,2 call Delay300ms goto MAIN Delay300ms movlw 0x5E movwf d1 movlw 0xEB movwf d2 Delay_0 decfsz d1, f goto $+2 decfsz d2, f goto Delay_0 goto $+1 nop retlw 0 END
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
|
| Tags |
| choice, micro, pic |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| MOSFET choice? | Nix | Electronic Projects Design/Ideas/Reviews | 12 | 31st May 2008 06:12 PM |
| Choice of Vcc and LDO Regulator | Papabravo | Datasheet/Parts Requests | 16 | 6th July 2007 03:10 PM |
| Mic choice | epilot | General Electronics Chat | 28 | 21st September 2006 07:51 PM |
| XTAL choice | Asjad | Micro Controllers | 2 | 17th April 2004 07:17 PM |
| Choice of barrery? | brodin | General Electronics Chat | 5 | 5th March 2004 10:37 AM |