Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Clock output

Status
Not open for further replies.
Internal 4MHz clock

hi,
Ive had a quick look thru the 16F88 datasheet, I dont think can bring out the internal clock.?

EDIT:
Look at Section 4:1 of datasheet, it says
 

Attachments

  • esp01 Mar. 05.gif
    esp01 Mar. 05.gif
    15.5 KB · Views: 125
Last edited:
even with programming? which means i cant handle with shift register? sigh ..

Look at my EDIT ref INTIO1

Recheck this image.? Its says it can be done. Prog INTOSC/FOSC2,1,0 to suit and check the osc output with a scope.
 

Attachments

  • esp02 Mar. 05.gif
    esp02 Mar. 05.gif
    46.7 KB · Views: 125
Last edited:
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.
 
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.

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'
 
Last edited:
How to get the clock output from the PIC to a clock input for a shift register? Thanks

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?
 
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'

Thanks. thumbs up!
 
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.
 
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.

Here is the schematic:
**broken link removed**
Well, I just want the parallel output to be converted as serial only. so thts y i choose shift register.

I do have another option to use assembly language but i am numb on that. Unless someone n guide me to have one particular register to serially output the data, well this method is much more preferable.
 
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.
 
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.

well, i din use that. So i OFF my MCLR for that.
The 4 parallel is the one connected to the DB4 ~ 7.
Do you know assembly well? :D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top