| Author |
Message |
rkvm2009
Joined: 10 Oct 2009 Posts: 2
|
10 Oct 2009 14:35 PWM module for pic 16f737 |
|
|
|
|
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
|
|
| Back to top |
|
 |
wp100
Joined: 15 May 2009 Posts: 324 Helped: 45 Location: England
|
11 Oct 2009 9:30 Re: PWM module for pic 16f737 |
|
|
|
|
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:
http://www.mikroelektronika.co.yu/en...ok/picbook.htm
http://www.mstracey.btinternet.co.uk...al/picmain.htm
http://www.pages.drexel.edu/~kws23/tutorials/PICTutorial/PICTutorial.html
http://www.to-pic.com/
http://www.devrs.com/pic/
http://www.rentron.com/pic.htm
http://tutor.al-williams.com/
http://www.pic-c.com/links/books.html
http://www.towertech.it/personal/azummo/
http://www.piclist.com/techref/piclist/index.htm
http://www.dontronics.com/piclinks.html
http://ee.cleversoul.com/pic.html
http://www.sparkfun.com/shop/index.p...324125&cat=52&
http://www.boondog.com/tutorials/pic16f84/pic16f84.html
http://www.voti.nl/swp/
http://www.botkin.org/dale/pic_tutorial.htm
http://www.programmersheaven.com/zone5/cat197/index.htm
http://www.siriusmicro.com/projects.html
http://members.vol.at/home.floery/electronix/picnic/
|
|
| Back to top |
|
 |
rkvm2009
Joined: 10 Oct 2009 Posts: 2
|
11 Oct 2009 14:28 PWM module for pic 16f737 |
|
|
|
|
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 =)
|
|
| Back to top |
|
 |
Google AdSense

|
11 Oct 2009 14:28 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
wp100
Joined: 15 May 2009 Posts: 324 Helped: 45 Location: England
|
11 Oct 2009 21:04 Re: PWM module for pic 16f737 |
|
|
|
|
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
|
|
|
| Back to top |
|
 |