Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
How to get the clock output from the PIC to a clock input for a shift register? Thanks
A piece of wire or a PCB track?.
A piece of wire or a PCB track?.
what do you mean by that? I din use PCB .....
I am using 16F88
hi tt,
Are you using the 16F88 internal clock or an external crystal.?
Internal 4MHz clock
hi,
Ive had a quick look thru the 16F88 datasheet, I dont think can bring out the internal clock.?
even with programming? which means i cant handle with shift register? sigh ..
I'd first define this:
Code:ifdef __16F88 __config _CONFIG1,_BODEN_OFF&_WDT_OFF&_LVP_OFF&_MCLR_OFF&_PWRTE_ON&_INTRC_IO
so output will be at RA6?
How to program it? ASM newbie here.
;Configuration Byte 1 Options
_CP_ALL EQU H'1FFF'
_CP_OFF EQU H'3FFF'
_CCP1_RB0 EQU H'3FFF'
_CCP1_RB3 EQU H'2FFF'
_DEBUG_OFF EQU H'3FFF'
_DEBUG_ON EQU H'37FF'
_WRT_PROTECT_OFF EQU H'3FFF' ;No program memory write protection
_WRT_PROTECT_256 EQU H'3DFF' ;First 256 program memory protected
_WRT_PROTECT_2048 EQU H'3BFF' ;First 2048 program memory protected
_WRT_PROTECT_ALL EQU H'39FF' ;All of program memory protected
_CPD_ON EQU H'3EFF'
_CPD_OFF EQU H'3FFF'
_LVP_ON EQU H'3FFF'
_LVP_OFF EQU H'3F7F'
_BODEN_ON EQU H'3FFF'
_BODEN_OFF EQU H'3FBF'
_MCLR_ON EQU H'3FFF'
_MCLR_OFF EQU H'3FDF'
_PWRTE_OFF EQU H'3FFF'
_PWRTE_ON EQU H'3FF7'
_WDT_ON EQU H'3FFF'
_WDT_OFF EQU H'3FFB'
_EXTRC_CLKOUT EQU H'3FFF'
_EXTRC_IO EQU H'3FFE'
_INTRC_CLKOUT EQU H'3FFD'
_INTRC_IO EQU H'3FFC'
_EXTCLK EQU H'3FEF'
_HS_OSC EQU H'3FEE'
_XT_OSC EQU H'3FED'
_LP_OSC EQU H'3FEC'
;Configuration Byte 2 Options
_IESO_ON EQU H'3FFF'
_IESO_OFF EQU H'3FFD'
_FCMEN_ON EQU H'3FFF'
_FCMEN_OFF EQU H'3FFE'
How to get the clock output from the PIC to a clock input for a shift register? Thanks
hi,
Ive looked at the 16F88.inc file in microchip for the CONFIG1 it says:
_INTRC_CLKOUT
_CONFIG1,_BODEN_OFF&_WDT_OFF&_LVP_OFF&_MCLR_OFF&_PWRTE_ON&_INTRC_CLKOUT
would do it.
EDIT: for reference
Code:;Configuration Byte 1 Options _CP_ALL EQU H'1FFF' _CP_OFF EQU H'3FFF' _CCP1_RB0 EQU H'3FFF' _CCP1_RB3 EQU H'2FFF' _DEBUG_OFF EQU H'3FFF' _DEBUG_ON EQU H'37FF' _WRT_PROTECT_OFF EQU H'3FFF' ;No program memory write protection _WRT_PROTECT_256 EQU H'3DFF' ;First 256 program memory protected _WRT_PROTECT_2048 EQU H'3BFF' ;First 2048 program memory protected _WRT_PROTECT_ALL EQU H'39FF' ;All of program memory protected _CPD_ON EQU H'3EFF' _CPD_OFF EQU H'3FFF' _LVP_ON EQU H'3FFF' _LVP_OFF EQU H'3F7F' _BODEN_ON EQU H'3FFF' _BODEN_OFF EQU H'3FBF' _MCLR_ON EQU H'3FFF' _MCLR_OFF EQU H'3FDF' _PWRTE_OFF EQU H'3FFF' _PWRTE_ON EQU H'3FF7' _WDT_ON EQU H'3FFF' _WDT_OFF EQU H'3FFB' _EXTRC_CLKOUT EQU H'3FFF' _EXTRC_IO EQU H'3FFE' _INTRC_CLKOUT EQU H'3FFD' _INTRC_IO EQU H'3FFC' _EXTCLK EQU H'3FEF' _HS_OSC EQU H'3FEE' _XT_OSC EQU H'3FED' _LP_OSC EQU H'3FEC' ;Configuration Byte 2 Options _IESO_ON EQU H'3FFF' _IESO_OFF EQU H'3FFD' _FCMEN_ON EQU H'3FFF' _FCMEN_OFF EQU H'3FFE'
Do you need to use the 4Mhz clock output? Or can you use a spare output pin and generate your own 'clock' (i.e. high, NOP, low) when you want to clock in data?
as i just want them synchronizaed
as i just want them synchronizaed
Unless you're writing to the shift register at a speed of 4Mhz (you're not!) you don't need a 4Mhz clock. The clock on a shift register is used when you want it to do something. You don't want it to do something that many times a second!
Perhaps if you post a circuit diagram or an overview of your circuit we can help. But the solution is probably going to be using a spare output pin and generating the pulse you need in code.
Well, I just want the parallel output to be converted as serial only. so thts y i choose shift register.
Oh and whilst this might be the only useful thing I ever contribute on these forums, your /MCLR pin is tied low. That wont work.
Pull it up to VDD with a resistor and switch it to GND if you need a reset switch.