Searching \ for '[PIC]: 12F629' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: '12F629'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: 12F629'
2003\10\23@124206 by =?iso-8859-1?Q?=C5ke_Neehr?=

picon face
Hello!


Anybody who knows if it´s possible to
buy 12F629 anywhere in Sweden??


Regards

ÅkeN

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu

2003\10\23@125243 by

picon face
Ake Neehr wrote:

>Hello!
> Anybody who knows if it?s possible to
> buy 12F629 anywhere in Sweden??

Farnell : 08-730 50 00 (you might have to register as a company)

If you need just three : sample.microchip.com   :-)

If you need volume, I think Crownhill or Rapid in the UK
are better...

Rapid   : 12F629 in 100+ quant :  0.66 UKP
Farnell : 12F629 in 100+ quant : 14.50 SEK (about 1 UKP I think)

Why has it to be in Sweden, b.t.w ?

Jan-Erik.

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu

2003\10\23@144824 by Wouter van Ooijen

face picon face
> Anybody who knows if it´s possible to
> buy 12F629 anywhere in Sweden??

I'm not in sweden, but I sell PICs by internet/mail. If you are not at
ease with international money transfer we might arrange that you pay to
Jan-Erik to be added to my credit :)

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu


'[PIC]: 12F629'
2006\08\22@150048 by Åke Neehr
picon face
Hello!

What is wrong?

I have config the 12F629 with GPIO, 0,1,2 as output
and GPIO, 4,5 as input.The GPIO,0 goes high first
and that is ok but when GPIO, 1 goes high after a
low input on GPIO, 5 the GPIO, 0 goes back to low
without any command. It´s not possible to hold both
this pins in high status at the same time?

0x07 on CMCON, clrf VRCON, INTRC_OSC_NOCLKOUT
MLCRE_ON, PWRTE_OFF

Someone who want to help me out with this problem?

Regards
ÅkeN

Codesnippet:

output       movf   mrx_ buffer,W
               xorwf  on, W               ; compere on code
               btfss   STATUS,Z
               goto    alarm
               bsf      GPIO, 0           ; turn on the green led
               call      delayP
check       btfsc    GPIO, 5           ; is the pin low
               goto     loop
               call      delayP
               btfsc    GPIO,5            ; test again ( slow Hz )
               goto     loop
               call      delayP
               bsf       GPIO, 1           ; turn on the red led
               call      delay0              ; alarm in 90 sec
               bcf       GPIO, 1            ;turn off the red led  
               goto     loop
alarm        movf     mrx_buffer, W    ; compere off code
               xorwf    off, W
               btfss     STATUS,Z
               goto      loop
               bcf        GPIO,0             ; turn off the green led
               goto      loop

2006\08\22@153757 by Wouter van Ooijen

face picon face
> I have config the 12F629 with GPIO, 0,1,2 as output
> and GPIO, 4,5 as input.The GPIO,0 goes high first
> and that is ok but when GPIO, 1 goes high after a
> low input on GPIO, 5 the GPIO, 0 goes back to low
> without any command. It´s not possible to hold both
> this pins in high status at the same time?

Yes, but not (reliably) the way you do it.

read http://www.voti.nl/swp/index.html, tips&pitfalls => I/O =>
last-but-one

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2006\08\22@160608 by Mike Hagen

flavicon
face
Ports changing state problem...
I am guessing at this one?


Make sure the part is set up correctly with TRISIO.
If using bit set and clear, you might have Read Modify Write problems.
If you have some outputs that read back low when reading ports, this
problem occurs when bit setting.
It will turn off ports you are not even looking at.

You can read about Read Modify Write in Microchip literature.  It is
just the way the did the hardware on the ports.
The part works.  Years ago, this was a big learning curve for lots.

I use a shadow register, say "sav_gpio".  Do your bit fiddling with that
and then move it to GPIO with a Move Instruction.
The temporary register cannot get modified like using the GPIO itself
connected to hardware.

Use the MPLAB debugger to check your program before you try programming
it.  Watch your shadow register in a window.

Good Luck



Mike Hagen
Hagen Engineering
Crestline, Ca.
.....MikeKILLspamspam.....HagenEng.com
(909) 338-5521




2006\08\24@134239 by Åke Neehr

picon face

----- Original Message -----
From: "Mike Hagen" <EraseMEpicdogspam_OUTspamTakeThisOuTdslextreme.com>
To: "'Microcontroller discussion list - Public.'" <piclistspamspam_OUTmit.edu>
Sent: Tuesday, August 22, 2006 10:06 PM
Subject: RE: [PIC]: 12F629


Hello!

After two days of hard work it doesn´t runs ok!
I have maked a shadowreg to GPIO and get the mask  of TRISIO to shadowreg
then the bsf and bcf instru and at last tris GPIO.

#define maskdef   0x1C

         movlw    maskdef
         movwf   shadow
         bsf         shadow, 0
         movf      shadow, W
         tris         GPIO                  ; load TRISIO with 0x1D in
MPSIM
                                                  ; but output not high on
pin 7
wait    btfsc      GPIO, 2
         goto       wait
         bsf         shadow, 1
         movf      shadow, W
         tris         GPIO

PLEASE HELP ME  WITH THIS PROBLEM!

Regards
ÅkeN

{Quote hidden}

> -

2006\08\24@140102 by Jan-Erik Soderholm

face picon face
Åke Neehr wrote :

> After two days of hard work it doesn´t runs ok!

What happens (or not happens) ?

> I have maked a shadowreg to GPIO and get the mask
> of TRISIO to shadowreg then the bsf and bcf instru and
> at last tris GPIO.

#define maskdef   0x1C

         movlw    maskdef
         movwf   shadow
         bsf         shadow, 0
         movf      shadow, W
         tris         GPIO        ; load TRISIO with 0x1D in MPSIM
       

I can not find the instruction "TRIS" in the 629 datasheet.
Isn't that the same as "movwf TRISIO" ?


                                      ; but output not high on pin 7

Where do you set GPIO0 = "1" ?
Where do you shut of the comparators ?

Jan-Erik.



2006\08\24@143746 by William Bross

picon face
Ake,

1. change the tris GPIO line to movwf   TRISIO.  Tris isn't valid anymore.
2. TRISIO is in bank 1, not bank 0.  Either make sure that the banksel
bit is set in the STATUS reg or get to it indirectly using the FSR
register.

That should help fix your problems.

Bill

Åke Neehr wrote:

>{Original Message removed}

2006\08\24@150857 by William Bross

picon face
One other thing is to make sure you disable the comparator if you are
not using it ----  load CMCON with 0x07 .

Bill

William Bross wrote:

{Quote hidden}

>>{Original Message removed}

2006\08\24@220543 by Mike Hagen

flavicon
face
part 1 4518 bytes content-type:text/plain; (decoded 7bit)

Ake,


Here is a small program that sets your LEDs based on inputs.  It uses a
shadow register so you LEDs on hardware don't modify your
Port values.

Always get basic stuff to work before going to more complicated
programming.  Use the SIMULATOR in MPLAB, it is GREAT!
Notice DEBUG statements (IFDEF), change them for checking condition of
each test case.  You don't need the hardware at all!

Try it and modify it for your use, it worked in the simulator and seems
OK to me?

I hope there are no major mistakes!  This is the way I start a project,
the are many ways to do it!




Good Luck

Mike Hagen
Hagen Engineering
Crestline, Ca.
KILLspamMikeKILLspamspamHagenEng.com
(909) 338-5521




;***********************************************************************
********************************************************
;Test12F629 for Ake on Piclist

;Turn On Green Led if input switch on GPIO4 is on - active LOW
;Turn On Red Led if input switch on GPIO5 is on - active LOW
 
;uses 12F629

;GPIO 0,1,2  Outputs  Leds on 0,1

;GPIO 3,4,5  Inputs
;Example for pullups on Inputs and a DIP switch to ground

;
;Michael F. Hagen
;DogItDesign
;(909) 338-5521
;RemoveMEMikeTakeThisOuTspamDogItDesign.com
;
;=======================================================================
===
;=======================================================================
===
;12F629 Fuses for Reference
;
; _CPD_ON                      EQU     H'3EFF'
; _CPD_OFF                     EQU     H'3FFF'
; _CP_ON                       EQU     H'3F7F'
; _CP_OFF                      EQU     H'3FFF'
; _BODEN_ON                    EQU     H'3FFF'
; _BODEN_OFF                   EQU     H'3FBF'
; _MCLRE_ON                    EQU     H'3FFF'
; _MCLRE_OFF                   EQU     H'3FDF'
; _PWRTE_OFF                   EQU     H'3FFF'
; _PWRTE_ON                    EQU     H'3FEF'
; _WDT_ON                      EQU     H'3FFF'
; _WDT_OFF                     EQU     H'3FF7'
; _LP_OSC                      EQU     H'3FF8'
; _XT_OSC                      EQU     H'3FF9'
; _HS_OSC                      EQU     H'3FFA'
; _EC_OSC                      EQU     H'3FFB'
; _INTRC_OSC_NOCLKOUT          EQU     H'3FFC'
; _INTRC_OSC_CLKOUT            EQU     H'3FFD'
; _EXTRC_OSC_NOCLKOUT          EQU     H'3FFE'
; _EXTRC_OSC_CLKOUT            EQU     H'3FFF'
;
;=======================================================================
===
;

;CODE
;*******************************************************************


       LIST                p=12F629                        ;PIC12F629 for
Production

       include        "p12f629.inc"

       __FUSES        _CP_OFF & _MCLRE_OFF & _WDT_OFF & _PWRTE_ON &
_EXTRC_OSC_NOCLKOUT

;EQUATES
;PIC bits in GPIO

GREEN                equ        0
RED                equ        1
BLUE                equ        2                ;not used in your case

INPUT1        equ        3
INPUT2        equ        4
INPUT3        equ        5

       

;REGISTER VARIABLES
;start at 020  in 12F675
;        
Sav_gpio        equ        0x20
Delaycount        equ        0x21
Whatever        equ        0x22


;de-comment this for any De-Bug code options
#DEFINE DEBUG
;
;********************************************************************
;               Program
;*********************************************************************
;comes here when it power-ups
start:

       org        0

       nop                                        ;for Debug with ICD2

       btfss        STATUS,NOT_PD

       goto        run                                ;skips initialization

;do this once on power-up
;*******************************************************************
;*******************************************************************
;        
;Initialize
init:

;clear variables
       clrf        GPIO
       clrf        Sav_gpio



       bsf        STATUS,RP0
;**BANK1

;****SET UP TRISIO Register which is in BANK1
       movlw        B'00111000'                        ;Bit 0.1.2. Outputs
       movwf        TRISIO                        ;Bit 3.4.5  Inputs


       bcf        STATUS,RP0
;**BANK0
         

 
 
;***********************************
;end of init
;***********************************




;*******************************************************************
;*******************************************************************
;RUN - do this after Initialize
;*******************************************************************
;*******************************************************************
;        
run:
       nop


       btfss                GPIO,INPUT1
       bsf                Sav_gpio,GREEN

IFDEF DEBUG
       bcf                Sav_gpio,GREEN
ENDIF


       btfss                GPIO,INPUT2
       bsf                Sav_gpio,RED

       movf                Sav_gpio,W
       movwf                GPIO
       
       call        delay

       movlw        0
       movwf                Sav_gpio
       movwf                GPIO                                ;turn LEDs OFF

       goto        run


 


;SUBROUTINES
;
;***********************************************
delay:

       movlw                0xff
       movwf                Delaycount

delay1:        decfsz        Delaycount,F
               goto                delay1
               retlw        0



       
    END



part 2 3669 bytes content-type:message/rfc822 (decode)

2006\08\25@162015 by Åke Neehr

picon face

----- Original Message -----
From: "William Bross" <spamBeGonewbrossspamBeGonespamcinci.rr.com>
To: "Microcontroller discussion list - Public." <TakeThisOuTpiclistEraseMEspamspam_OUTmit.edu>
Sent: Thursday, August 24, 2006 9:09 PM
Subject: Re: [PIC]: 12F629

William Bross wrote:

One other thing is to make sure you disable the comparator if you are
not using it ----  load CMCON with 0x07 .

Bill

Hello!

Yes, I changed from tris GPIO to movwf  TRISIO
and now my alarmcircuit works very good!

Thanks to all of YOU who has wasted YOUR time
at my problem!

Regards
ÅkeN

William Bross wrote:

{Quote hidden}

2006\08\25@191532 by Bob Axtell

face picon face
Åke Neehr wrote:
{Quote hidden}

We have ALL had a similar problem. Don't worry about it.

--Bob

More... (looser matching)
- Last day of these posts
- In 2006 , 2007 only
- Today
- New search...