Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PWM module for pic 16f737

Status
Not open for further replies.

rkvm2009

Newbie level 2
Joined
Oct 10, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,295
Hello all ...

at first, sorry for my bad english...
I'm get started to use pic 16f737 and I need some help with this pic...

If someone can help i'll be very happy...
-someone have any good beginner tutorial that can help me with the pic 16f737, (about the OSCillator, OPTIONs, INTCON, etc...)?
-someone can teach me how to use the pwm module of the pic 16f737??

It's all for now... I'm waiting for answers... thanks everybody!
rkvm2009
 

Hi,

Think you will find this assembler tutorial is one of the best ; it includes a PWM section as well.
http://www.winpicprog.co.uk

Most of the code will run on your chip without modification.




Here are some others that might help-

3. Where to find tutorials?

The tutorials by Microchip as detailed above and many datasheets and application notes from the same Microchip website.

For practical hand on experiment, try Nigel Goodwins tutorials (they use 16F628,876 & 877) and have different "module boards" to play with which also includes the newly added wireless interfacing tutorial:

http://www.winpicprog.co.uk

And some other that include tutorials & projects:
**broken link removed**
broken link removed
**broken link removed**
http://www.to-pic.com/
http://www.devrs.com/pic/
http://www.rentron.com/pic.htm
**broken link removed**
**broken link removed**
**broken link removed**
http://www.piclist.com/techref/piclist/index.htm
http://www.dontronics.com/piclinks.html
http://ee.cleversoul.com/pic.html
**broken link removed**
**broken link removed**
http://www.voti.nl/swp/
**broken link removed**
**broken link removed**
http://www.siriusmicro.com/projects.html
**broken link removed**
 
Last edited by a moderator:

Thanks wp100....
But I want to know how to use the register of the
pic 16f737 if you have a tutorial that explain that i'll be
very happy...
I have the datasheet of the pic 16f737 but that's not all
that I need... do you understand me?

Ah, and I want to have samples about that topics...

thanks anyway =)
 

Hi,

Have not seen a tutorial dedicated to just explaining the many registers used by a pic.

It is usually a case of learning to do a particular function like PWM that then introduces you to the relevant registers like the CCP and Timer2 registers for PWM.

Microchip detail all the registers in the data sheet, but for a beginner trying to follow microchips full description of them is a lost cause, thats why so many people write the tutorials.

If you follow Nigel Goodwins tutorials which start with the simple function of flashing a led, that introduces you to the config and 6 registers.

Have attached that led code, but updated so it should run on you 737 chip.

hope that helps .. ?



Code:
	LIST	p=16F737		;tell assembler what chip we are using
	include "P16F737.inc"		;include the defaults for the chip
	errorlevel -302		; no bank warnings


;	Configuration bits 
;	==================
  
; specified here are changes to the .inc file defaults

   __CONFIG    _CONFIG1,  _CP_OFF & _CCP2_RC1 & _DEBUG_OFF & _VBOR_2_0 & _BOREN_0 & _MCLR_On & _PWRTE_OFF & _WDT_OFF & _INTRC_IO

		org	0x0000			;org sets the origin, 
Start	goto	Main		;this is where the program starts running




Main

  	bsf 	STATUS,	RP0		;select bank 1	

    movlw	b'01100010'		; set internal osc to 4 mhz
	movwf	OSCCON

	movlw	0x07
	movwf	CMCON			;turn comparators off 

   	movlw 	b'00000000'		;set PortB all outputs
   	movwf 	TRISB
	movwf	TRISA			;set PortA all outputs

	bcf		STATUS,	RP0		;select bank 0

Loop	
	movlw	0xff
	movwf	PORTA			;set all bits on
	movwf	PORTB
	nop				;the nop's make up the time taken by the goto
	nop				;giving a square wave output
	movlw	0x00
	movwf	PORTA
	movwf	PORTB			;set all bits off
	goto	Loop			;go back and do it again

	end
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top