
Originally Posted by
tenaja
And what would be the problem with using a 1MHz clock?
YES--Of COURSE you can use Pulsin for a 2 second pulse! Most PIC's have internal clocks that are capable of it. Heck, if you need a faster clock for other stuff, just slow down (i.e. change osccon) right before the pulsin and put it back after.
Tenaja there is a problem, when i code this:
Code:
OPTION_REG = $07
ANSEL = $00 'para hacer funcionar todas las E/S como digitales
TRISA = $07 'Configura PORTA <5:3> salidas y PORTA <2:0> salidas
TRISC = $00 'Configura PORTC <5:0> todas salidas
INTCON = $00 'Interrupciones deshabilitadas
OSCCON = $47 'Oscilador 8MHz
DEFINE OSC 1 '8MHz
inicio:
pulsout PORTC.5,25000
pause 100
goto inicio
i get an Error:
Error c:\picmicro\mcstud~1\pbp246\pbppic14.lib 6152 : [255] Unidefined Sybol 'PAUSEUSL'
looking in pbppic14.lib it seems that the lowest frecuency that can be handled by PBP is 3.58MHz, but pic16f684 can handle since frecuency from 31KHz.
But inclusive having that error I sumulate the HEX, and works, my question is, this error will give me headache????
--EDIT--
I took away the line
DEFINE OSC 1 'for 1MHz oscillator
and code was compiled just fine, the only thing is that PAUSE increments are bigger
with DEFINE OSC 1
PAUSE 100 'has a duration of 5mS
without DEFINE OSC 1
PAUSE 100 'has a duration of 400mS
Bookmarks