yet another PIC12F683 ADC problem

Status
Not open for further replies.
30 day trial version? Enable it all functions? Or is it inside any limitations? Where from can I download it? Think You for this: PIC Simulator IDE with Basic Compiler, Assembler, Disassembler and Debugger ?

fejesg

hi,
Which question do you want answering first.

Oshon Software Homepage

Download the fully working 30 day or 30 times run, PIC IDE

Get it and load your program

BTW: now moved onto the second part of your posted program, there a big sections missing.!. References to an ISR etc, so I will stop.

Why dont you write a short program that reads the ADC, prove it OK.
then move forward to the PWM.
Always debug peripheral subr before writing a full program.

I'll look thru the MPLAB sim, personally I dont like it, maybe someone with experience will answer.
 
Sorry, Eric; I can not understand Your message:

"BTW: now moved onto the second part of your posted program, there a big sections missing.!. References to an ISR etc, so I will stop."

So. I think, the program which I wrote is a "small try" one. Can You make smaller test program?

If You can, please send me a small "test" program, with wich I can try to work ADC.

Thank You the information about Oshon Simulator.

fejesg
 
I try to make my program shorter:


But how I check working of ADC? With witch can I sign value of ADRESL or ADRESH?

fejesg
 
Ahoy Eric!

I downloaded Oshon, runned the program; SUCCESS! I setted up special breakpoints, stop when ADRESL or ADRESH changes - when I modified Voltage (2,39V) of GP0, the program STOPPED, ADRESL and ADRESH have values !!!!!!!!!!!

I hope, the program will works inside of PIC...

fejesg
 
Yeeeah !!!! ThanX for Eric !

When I tryed program whith Oshorn PicSim and chacked registers again, I realized, what is the error - I could modify CCP1CON, in place of CCPR1L !

I corrected ANSEL, that conversion time shall be Fosc/16, I use only GP0. And go! The circuit works; I putted in the "already workable" direction-change-unit, and the program is ready.

 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…