Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - pic12f675 adc problem

(you are viewing a thread; or go back to list of threads)

pic12f675 adc problem (by MedTronic)
Dear all my friends
i make a program (attached) witch control a 4 relay depends on filtered adc input the program not working with pic12f675 out1 and out2 work but out3 and out4 not working ... testing the same program with pic16f88 it works well .... why
please help me
thanks in advaced
Sat Oct 3 2020, 18:50:29, download attachment ADC4Relay.ld
(no subject) (by MGP)
I think it cannot work on a 16F88 either, when simulating you get a 'stack underflow' error.

And...

- wrong config. bits
- misuse of the "master relay" instruction
- using gosub is not needed in your program

Also I think that rung 11 will give you a wrong result because the math contains a bug, see
http://cq.cx/ladder-forum.pl?a...;parent=9515&tt=1582995046

Due to the math problem, LDmicro has become unusable.
Sun Oct 4 2020, 06:48:54
(no subject) (by MedTronic)
Dear my friend
i remove the master relay command ... and also remove the sub program .... but the same problem please help me with a working program for pic12f675
thanks
MedTronic
Sun Oct 4 2020, 10:02:31, download attachment ADC4Relay.ld
(no subject) (by MedTronic)
proteus file attached
Sun Oct 4 2020, 10:03:24, download attachment ADC4Relay.DSN
(no subject) (by paulino)
(por MedTronic, pic12f675 problema adc).

Try with this one that you modified The ADC new By ADCv (since the names of examples must be changed as the names of the inputs as the outputs) I test it simulating it and it works for me

Prueba con este que té modificado El ADC new Por ADCv (ya que los nombres de ejemplos se deben cambiar como los nombres de las entradas como las salidas) yo lo pruebo simulándolo y me funciona
Sun Oct 4 2020, 13:15:49, download attachment ADC4RelayModi.ld
(no subject) (by MGP)
@Paulino, I still have the stack underflow error when simulating.

@MedTronic: attached your program with the correct config-bits for the 12F625.
Sun Oct 4 2020, 14:43:28, download attachment ADC4Relay_V2.ld
(no subject) (by MedTronic)
To MGP
Thank you for your help but now the program run normally but their is two error with proteus can you please help how to solve this error
thank you again
MedTronic
Sun Oct 4 2020, 18:03:28, download attachment Proteus error.gif
(no subject) (by MGP)
These are not errors but warnings.

I don't know about the adc warning, I never got into any problems with it because I didn't even know that.

A 12F625 has only 1 config-bit address, address 2007h and address 2008h does not exist, but by entering 3FC4 (default) in the config bits, C4 is loaded in address 2007h and 3F in address 2008h and the latter gives that warning but is harmless .
You can try by entering 0xC4 in the configbits field.
Mon Oct 5 2020, 03:21:09
(no subject) (by MGP)
I see that you have Protheus, maybe you could try if you also get that error in that calculation.
Mon Oct 5 2020, 03:29:51, download attachment Calc_16F628a_ADD_test_pro.ld
(no subject) (by paulino)
configuración de bit para el pic16f88 0x3FC4
Cambia el Nombre del (DCnew) Ejemplo (DCan) ya que se tienen que cambiar los nombres de las variables de entrada como de salida.

bit setting for pic16f88 0x3FC4
Change the Name of the (DCnew) Example (DCan) since the names of the input and output variables have to be changed.
Mon Oct 5 2020, 08:07:35
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):