PIC16F72: How to...?

Status
Not open for further replies.

DelheZi

New Member
Instruction that I needed:

-How to initaite
-How to get an analogue input
-How to use a timer

Basically is how do I start to learn all the stuff I needed to write out a programme that I needed.

URGENT help needed. Thanks! :!:
 
For instance, where should I start looking or learn up? Is there any site for newbie specifically for PIC16F72??!
Considering myself a totally newbie in PIC.
I learnt Zilog, Motorola 68k, & Intel 8080 in my diploma last time, but never learn PIC16F72 yet.

Any advise would be appreciated!



A short moment ago, I heard from a friend of mine saying that to initiate the ADC is very difficult, might as well using a standalone IC to perform on the ADC instead of have to write on the ADC portion on the PIC16F72!
This will save loads of works!

How's the suggestion of my friend? I need the program to be done before 22'nd of Apr.
Can anyone here really able/capable to help?
 

No, it would mean a LOT more work, both hardware and software - as I suggested previously, read my analogue tutorial which shows you EXACTLY how to use the ADC in a PIC - it's really very easy, the problem is getting the details off the datasheets, my tutorial does this for you!.

I'm presuming the 16F72 has analogue inpits?, it's not a PIC I'm familiar with!.
 

Yes, I can ensure that PIC16F72 is ADC capable. It has total of 5 analogue input with 8 bit digital conversion. How can I contact u if I have some enquiries regarding to your tutorials? By e-mail? Phones? Please advise. I'm from Malaysia, Asia.
 
From your tutorials there, do I really need to build all the respective board in order to better understand the ADC workout?
 
DelheZi said:
From your tutorials there, do I really need to build all the respective board in order to better understand the ADC workout?

No, the boards are there to give proven working hardware, you don't have to use them.
 
I still can't write out a program using assembly language.
My lecturer asked me to complete by using PIC basic approach. Anyone have any idea? Basic language... Will my output 5V stable? I heard that it'll reduce to around 3V+...
Any comment?
 
DelheZi said:
I still can't write out a program using assembly language.
My lecturer asked me to complete by using PIC basic approach. Anyone have any idea? Basic language... Will my output 5V stable? I heard that it'll reduce to around 3V+...
Any comment?
Don't worry about HIGH Level. 8051s used to have problems with "weak" High, but PICs can deliver up to 25mA current with minimal voltage drop.
 
Many thanks to Jay.slovak... U're major in PICbasic right? Can PICbasic write a program to trigger an analogue input or output? My project is to sense the analogue input at different voltage levels across 1.5V-5V. Please advise, or kind enough to show me the steps?
Thanks in advance!
 
No, I must dissapoint you, I use only Asembly (due to it's closeness to HW). But I'm prety sure such program is possible. I know that somebody on this forum will help you. 8)
 
Jay.slovak,

Really? What is a HW? Who do u think will be able to help me with this? PIC basic language... with analogue I/O... It's quite urgent, though...
 
DelheZi said:
Jay.slovak,

Really? What is a HW? Who do u think will be able to help me with this? PIC basic language... with analogue I/O... It's quite urgent, though...

HW - HardWare - the PIC itself.

You can do analogue inputs using BASIC, there are usually sample programs with the compilers that show you how - analogue outputs are a different matter!, most PIC's don't have them!, in fact I don't know of one that does (although I seem to remember there are some?).

There are various ways to add them though, depending what you are trying to do!.
 
Hi Nigel Goodwin,

Nice to see u again. Yeah, do u familiar with PIC basic? It seems easier to use & understand too. Coz I still can't do a simple program like:-

- Pause for 1 hours
- Get Analogue input
- Compare if >3.5V -if yes, output high at pin x; if no, next step
- Compare if >2.5V -if yes, output high at pin y; if no, next step
- Output high at pin z
- Loop back to top


Does my program make sense? Ok right? Can anyone help me in the way of either PIC basic or Assembly?
 
DelheZi said:
Hi Nigel Goodwin,

Nice to see u again. Yeah, do u familiar with PIC basic? It seems easier to use & understand too. Coz I still can't do a simple program like:-

Sorry, I don't use PIC BASIC either :cry:


It's not very complicated?, check the examples that came with your BASIC compiler - they are all a little bit different to use.

Even in assembler it's not hard to do that, as with any program, break it down in to smaller steps - for the 1 hour delay you could generate the assembler using the 'delay code generator' on the PICList.
 
Sorry to say that I'm not quite sure of what u saying here (link?), not familiar at all.
Please explain or show more on it... thanks & really sorry for asking this much... :cry:

Anyway, I have the uploader of 16F72, but I do not have 16F72 compiler... The closest model I have is 16C72 & 16F74. Can I pressume them are compatible? :?:
 

I would expect the 16F74 to be VERY similar, compare the datasheets (it might even be the same one!).
 
TRISA=%001011 ;init ooioii
TRISB=%00011111 ;init oooiiiii
TRISC=%00111111 ;init ooiiiiii

MAIN: If PORTA=%000000 then goto BUZZ
If PORTB=%00000000 then goto BUZZ
Goto MAIN

BUZZ: High PORTB.4

This is something PIC basic looks like.
Can anyone teach me how to get analogue input convert into 8-bit digital? And also, how to clear all the bit in a TRIS... and how to compare a specific bit (let say bit 4) like the command for "IF" port, bit "THEN GOTO" loop ??
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…