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.

pic 16f72 project

Status
Not open for further replies.

garg29

New Member
could anyone please send me some examples based on PIC 16F72.or some projects related to this like a simple led glowing one will also do. so that i can practice it.

will be really thankfull .
eagerly waiting for your response

thanking you
neelam
 
garg29 said:
could anyone please send me some examples based on PIC 16F72.or some projects related to this like a simple led glowing one will also do. so that i can practice it.

will be really thankfull .
eagerly waiting for your response

It's just a 14 bit PIC, any 16F code will work with hardly any changes, and there's LOT's available on the net.

Check my tutorials.
 
thanks for your reply but i couldnot get any example specifically for pic 16f72.theres lots on 16f84.
please could you let me know on which site i can find the examples of 16f72.
neelam
 
garg29 said:
thanks for your reply but i couldnot get any example specifically for pic 16f72.theres lots on 16f84.
please could you let me know on which site i can find the examples of 16f72.

As I mentioned above, they are all just 14 bit PIC's, they run the same code - with only very minor changes, due solely to their extra hardware.

It's highly unlikely you will find any 16F72 examples on the net, it's probably too new, but there's no need for it anyway.
 
thanks for your reply but i couldnot get any example specifically for pic 16f72.theres lots on 16f84.
please could you let me know on which site i can find the examples of 16f72.
neelam

LIST p=16F72 ;tell assembler what chip we are using
include "P16F72.inc" ;include the defaults for the chip
__config 0x3D1A ;sets the configuration settings (oscillator type etc.)

cblock 0x20 ;start of general purpose registers
count1 ;used in delay routine
counta ;used in delay routine
countb ;used in delay routine
endc



org 0x0000 ;org sets the origin, 0x0000 for the 16F628,
;this is where the program starts running
movlw 0x07
movwf STATUS ;turn comparators off (make it like a 16F84)

bsf STATUS, RP0 ;select bank 1
movlw b'00000000' ;set PortB all outputs
movwf TRISB
bcf STATUS, RP0 ;select bank 0
clrf PORTB ;set all outputs low

Loop
movlw b'10000000'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11000000'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11100000'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11110000'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11111000'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11111100'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11111110'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11111111'
movwf PORTB
call Delay ;this waits for a while!
goto Loop ;go back and do it again

Delay movlw d'250' ;delay 250 ms (4 MHz clock)
movwf count1
d1 movlw 0xC7
movwf counta
movlw 0x01
movwf countb
Delay_0
decfsz counta, f
goto $+2
decfsz countb, f
goto Delay_0

decfsz count1 ,f
goto d1
retlw 0x00

end







FOR FURTHER PROBLEM CONTACT ME AT 011-65174839 I HAVE LOTS OF PROJECTS BASED ON 16F72
 
FOR FURTHER PROBLEM CONTACT ME AT 011-65174839 I HAVE LOTS OF PROJECTS BASED ON 16F72

Tel: 011-65174839 calling.........

Hello I'm Gayan From Electro Tech can I speak to devdev please........

Ahh devdev can you tell me do you need to turn off comparators in 16F72?Do you need STATUS reg for that?

PORTA is multiplexed with analog inputs so it needs to make digital inputs using ADCON1 isn't it?

PORTB is clear so it doesn't need to do anything.
 
Last edited:
thanks for your reply but i couldnot get any example specifically for pic 16f72.theres lots on 16f84.
please could you let me know on which site i can find the examples of 16f72.
neelam

As far as code is concerned, you can get by with modifying code for the '84 to the '72, but there is a big differnece in the chips themselves. The '72, for example, is a 28-pin device with completely different Vdd-Vss layout, for example.

If you want simple interchange between the '84 and another chip, take advantage of Microchip's very liberal sample program, and order out a 16F88, which is a lot newer chip, but basically the same as the '84 as to layout, etc.
 
hi devdev,

Did you read the date on that original post...:rolleyes:
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top