Firts that nothing, hello everybody
Im using gen4uLCD70DT and I configured digital outputs,digital inputs and analog inputs as I show below:
pin_Set(PIN_AN, PA0); // entrada de sensor CO
pin_Set(PIN_AN, PA1); // entrada de sensor PR
pin_Set(PIN_OUT,PA9);//ELECTROVÁLVULA 1
pin_Set(PIN_OUT,PA8);//ELECTROVÁLVULA 2
pin_Set(PIN_OUT,PA7);//ELECTROVÁLVULA 3
pin_Set(PIN_OUT,PA6);//ELECTROVÁLVULA 4
pin_Set(PIN_OUT,PA5);//ELECTROVÁLVULA 5
pin_Set(PIN_OUT,PA4);//ELECTROVÁLVULA 6
pin_Set(PIN_OUT,PA10);//ELECTROVÁLVULA 7
pin_Set(PIN_OUT,PA11);//ELECTROVÁLVULA 8
pin_Set(PIN_OUT,PA3);//BUZZER
pin_Set(PIN_OUT,PA12);//RELEVADOR MONÓXIDO DE CARBONO
pin_Set(PIN_OUT,PA13);//RELEVADOR PUNTO DE ROCÍO
pin_Set(PIN_INP_HI,PA2);//SILENCIAR
pin_Set(PIN_INP_HI,PA15);//BOTÓN CAMBIAR TORRE A-B
pin_Set(PIN_INP_HI,PA14);//BOTÓN CAMBIAR SECADOR 1-2
All work fine except PA12 and PA13, theese are 2 volts all time, they should turn off and turn on depend of next condition
//FOR PA12
if(flt_FTOI(control1)<=10)
pin_LO(PA12);//RELEVADOR
img_SetWord(hndl, iUserimages8, IMAGE_INDEX, 0) ; // 1= sensor desconectado, 0= sensor conectado normal
img_Show(hndl,iUserimages8) ;
else if(flt_FTOI(control1)>10)//sensor conectado, en condiciones Anormales
pin_HI(PA12);//RELEVADOR
img_SetWord(hndl, iUserimages8, IMAGE_INDEX, 2) ; // 1= sensor desconectado, 0= sensor conectado, 2=Alto CO
img_Show(hndl,iUserimages8) ;
if(silenciar)pin_Pulseout(PA3, 250);//BUZZER
endif
//---------------------------------------------------------------------------------------
//FOR PA13
img_SetWord(hndl, iUserimages4, IMAGE_INDEX, 0) ; // donde 0 es °C , y 1 es °F
img_Show(hndl,iUserimages4) ;
//sensor conectado, en condiciones normales PR <= +2°C
if(flt_FTOI(control2)<=42)//el numero es antes de meterlo al vetor "vec"
pin_LO(PA13);//RELEVADOR
img_SetWord(hndl, iUserimages9, IMAGE_INDEX, 0) ; //1= sensor desconectado, 0= sensor conectado, 2= Alto punto de rocío
img_Show(hndl,iUserimages9) ;
else if(flt_FTOI(control2)>42)//sensor conectado, en condiciones Anormales PR > +2°C
pin_HI(PA13);//RELEVADOR
img_SetWord(hndl, iUserimages9, IMAGE_INDEX, 2) ; //1= sensor desconectado, 0= sensor conectado, 2= Alto punto de rocío
img_Show(hndl,iUserimages9) ;
if(silenciar)pin_Pulseout(PA3, 250);//BUZZER
endif
I have been tried doing other code only blinking PA12 and PA13 and it works fine, with this test I rule out that pins PA12 and PA13 are damaged
Can someone help me to solve this problem ?, since it is really necessary to use this gpio number, and I see no problem in the declaration of pins as output. All other pins work great. I have reviewed the gen4-ulcd-70d_datasheet_r_1_10 in section 3. Hardware Overview and PA12 and PA13 are general porpose I/O. but they do not work in any condition, I measured with the multimeter and they are stunned at 2 volts, they are not at 0 or 3.3v
Im using gen4uLCD70DT and I configured digital outputs,digital inputs and analog inputs as I show below:
pin_Set(PIN_AN, PA0); // entrada de sensor CO
pin_Set(PIN_AN, PA1); // entrada de sensor PR
pin_Set(PIN_OUT,PA9);//ELECTROVÁLVULA 1
pin_Set(PIN_OUT,PA8);//ELECTROVÁLVULA 2
pin_Set(PIN_OUT,PA7);//ELECTROVÁLVULA 3
pin_Set(PIN_OUT,PA6);//ELECTROVÁLVULA 4
pin_Set(PIN_OUT,PA5);//ELECTROVÁLVULA 5
pin_Set(PIN_OUT,PA4);//ELECTROVÁLVULA 6
pin_Set(PIN_OUT,PA10);//ELECTROVÁLVULA 7
pin_Set(PIN_OUT,PA11);//ELECTROVÁLVULA 8
pin_Set(PIN_OUT,PA3);//BUZZER
pin_Set(PIN_OUT,PA12);//RELEVADOR MONÓXIDO DE CARBONO
pin_Set(PIN_OUT,PA13);//RELEVADOR PUNTO DE ROCÍO
pin_Set(PIN_INP_HI,PA2);//SILENCIAR
pin_Set(PIN_INP_HI,PA15);//BOTÓN CAMBIAR TORRE A-B
pin_Set(PIN_INP_HI,PA14);//BOTÓN CAMBIAR SECADOR 1-2
All work fine except PA12 and PA13, theese are 2 volts all time, they should turn off and turn on depend of next condition
//FOR PA12
if(flt_FTOI(control1)<=10)
pin_LO(PA12);//RELEVADOR
img_SetWord(hndl, iUserimages8, IMAGE_INDEX, 0) ; // 1= sensor desconectado, 0= sensor conectado normal
img_Show(hndl,iUserimages8) ;
else if(flt_FTOI(control1)>10)//sensor conectado, en condiciones Anormales
pin_HI(PA12);//RELEVADOR
img_SetWord(hndl, iUserimages8, IMAGE_INDEX, 2) ; // 1= sensor desconectado, 0= sensor conectado, 2=Alto CO
img_Show(hndl,iUserimages8) ;
if(silenciar)pin_Pulseout(PA3, 250);//BUZZER
endif
//---------------------------------------------------------------------------------------
//FOR PA13
img_SetWord(hndl, iUserimages4, IMAGE_INDEX, 0) ; // donde 0 es °C , y 1 es °F
img_Show(hndl,iUserimages4) ;
//sensor conectado, en condiciones normales PR <= +2°C
if(flt_FTOI(control2)<=42)//el numero es antes de meterlo al vetor "vec"
pin_LO(PA13);//RELEVADOR
img_SetWord(hndl, iUserimages9, IMAGE_INDEX, 0) ; //1= sensor desconectado, 0= sensor conectado, 2= Alto punto de rocío
img_Show(hndl,iUserimages9) ;
else if(flt_FTOI(control2)>42)//sensor conectado, en condiciones Anormales PR > +2°C
pin_HI(PA13);//RELEVADOR
img_SetWord(hndl, iUserimages9, IMAGE_INDEX, 2) ; //1= sensor desconectado, 0= sensor conectado, 2= Alto punto de rocío
img_Show(hndl,iUserimages9) ;
if(silenciar)pin_Pulseout(PA3, 250);//BUZZER
endif
I have been tried doing other code only blinking PA12 and PA13 and it works fine, with this test I rule out that pins PA12 and PA13 are damaged
Can someone help me to solve this problem ?, since it is really necessary to use this gpio number, and I see no problem in the declaration of pins as output. All other pins work great. I have reviewed the gen4-ulcd-70d_datasheet_r_1_10 in section 3. Hardware Overview and PA12 and PA13 are general porpose I/O. but they do not work in any condition, I measured with the multimeter and they are stunned at 2 volts, they are not at 0 or 3.3v
Comment