## [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas]

 [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] From: Markos - 2007-03-08 15:21:57 ```Hello, The datasheet does not mention anything about the voltage reference max input voltage. If you see in "electrical characteristic", states that you cannot operate the device above 0.8V over VDD in IO pins: VIH Input High Voltage I/O ports: D040 with TTL buffer 0.25 VDD + 0.8V Thats all i've found about it, because in the ADC chapter doesn't mention anything about it. By the way: If I use two series resistor, say, I would divide the voltage. If I divithe the voltage, say by 2, every bit in the conversions must be muplitplied by two. Example: 5V Voltage reference, at 1024 bits (ADC resolution) gives me 4,8 mv /bit. Lets imagine I connect a 10V batt with two 100k res. VIN will be 5V, same as Vref, adc result all '1' . Here, every ADC step means 4,8 mv * 2 (voltage divider) = 9,6 mV . Thats not accurate enough, because the PIC (and I think any ADC) specs says +- 1 LSB in the conversion. so, the conversion could be at least +- 9,6 mV wrong, which is not suitable for say Nimh batts, that require the charge to be cuttof when a 10mV curve occurs. So, to summarize it, If I divide the voltage, I loose resolution (inverse proportional). Same applies to the Op Amp, which will reduce the voltage too, but with higher part count and cost ;-) Regards. -------- Mensaje original -------- Asunto: Re: [Sdcc-user] [OT] - ADC Ideas Fecha: Thu, 8 Mar 2007 11:46:51 -0300 De: C C Budden Responder a: sdcc-user@... Para: Referencias: <45EFCDC4.2030404@...> Hi Markos. Did Yoy take a look on the PIC datasheet? If you have a Voltage reference (2 pins) on the IC apart power supply, and in the datasheet is specified that can support 12 V with 5V on power supply, of course you can. I didn´t see that PIC datasheet, but in case that you cannot use that voltage reference range, you will have to make a conditioning signal circuit with an operational amplifier. Take care to not exed the specified ranges or damage of the device may ocurr. On a simple way, if you use a couple of resistors use metal film resistor diu to the lower inductance they have compared with others. On most AD imputs its not recommended to use caps, inductors exept you have the impedances well separated. I hope this help you. Regards, Casiano. ----- Original Message ----- From: "Markos" To: Sent: Thursday, March 08, 2007 5:48 AM Subject: [Sdcc-user] [OT] - ADC Ideas > Hi guys, > maybe this is a little offtopic, but i'm sure you could > help me. I'm implementing a simple battery charger, and I need to > messaure voltages ranges from 0 to 12 V. > ¿Could I use the PIC integrated ADC to messaure above 5 V (provided that > I use the voltage reference pins tied to 0 and 12 V, for example)? Most > external ADC have a 0 to 5V input range.... > How would you guys solve this? Any Ideas? > > Thanks in advance. > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > > __________ NOD32 1.1458 (20060324) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Sdcc-user mailing list Sdcc-user@... https://lists.sourceforge.net/lists/listinfo/sdcc-user ```

 [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] From: Markos - 2007-03-08 15:21:57 ```Hello, The datasheet does not mention anything about the voltage reference max input voltage. If you see in "electrical characteristic", states that you cannot operate the device above 0.8V over VDD in IO pins: VIH Input High Voltage I/O ports: D040 with TTL buffer 0.25 VDD + 0.8V Thats all i've found about it, because in the ADC chapter doesn't mention anything about it. By the way: If I use two series resistor, say, I would divide the voltage. If I divithe the voltage, say by 2, every bit in the conversions must be muplitplied by two. Example: 5V Voltage reference, at 1024 bits (ADC resolution) gives me 4,8 mv /bit. Lets imagine I connect a 10V batt with two 100k res. VIN will be 5V, same as Vref, adc result all '1' . Here, every ADC step means 4,8 mv * 2 (voltage divider) = 9,6 mV . Thats not accurate enough, because the PIC (and I think any ADC) specs says +- 1 LSB in the conversion. so, the conversion could be at least +- 9,6 mV wrong, which is not suitable for say Nimh batts, that require the charge to be cuttof when a 10mV curve occurs. So, to summarize it, If I divide the voltage, I loose resolution (inverse proportional). Same applies to the Op Amp, which will reduce the voltage too, but with higher part count and cost ;-) Regards. -------- Mensaje original -------- Asunto: Re: [Sdcc-user] [OT] - ADC Ideas Fecha: Thu, 8 Mar 2007 11:46:51 -0300 De: C C Budden Responder a: sdcc-user@... Para: Referencias: <45EFCDC4.2030404@...> Hi Markos. Did Yoy take a look on the PIC datasheet? If you have a Voltage reference (2 pins) on the IC apart power supply, and in the datasheet is specified that can support 12 V with 5V on power supply, of course you can. I didn´t see that PIC datasheet, but in case that you cannot use that voltage reference range, you will have to make a conditioning signal circuit with an operational amplifier. Take care to not exed the specified ranges or damage of the device may ocurr. On a simple way, if you use a couple of resistors use metal film resistor diu to the lower inductance they have compared with others. On most AD imputs its not recommended to use caps, inductors exept you have the impedances well separated. I hope this help you. Regards, Casiano. ----- Original Message ----- From: "Markos" To: Sent: Thursday, March 08, 2007 5:48 AM Subject: [Sdcc-user] [OT] - ADC Ideas > Hi guys, > maybe this is a little offtopic, but i'm sure you could > help me. I'm implementing a simple battery charger, and I need to > messaure voltages ranges from 0 to 12 V. > ¿Could I use the PIC integrated ADC to messaure above 5 V (provided that > I use the voltage reference pins tied to 0 and 12 V, for example)? Most > external ADC have a 0 to 5V input range.... > How would you guys solve this? Any Ideas? > > Thanks in advance. > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > > __________ NOD32 1.1458 (20060324) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Sdcc-user mailing list Sdcc-user@... https://lists.sourceforge.net/lists/listinfo/sdcc-user ```
 Re: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] From: Lon Howze - ID - 2007-03-08 15:55:31 ```Two op-amps configured as a difference amplifiers with a gain of 1 could = be cascaded to provide a full-scale voltage of 5V. This would give a = minimum reading of 7V with a maximum reading of 12V. Again you would = want to use the most precise resistors and op-amps you can afford in the = circuit. The 2V input to the second op-amp could be developed from a = resistor-divider network off the 5V supply as mentioned earlier. The = resistor values shown are just one example. Op-Amp 1: 12V - 5V =3D 7V Op-Amp 2: 7V - 2V =3D 5V |\ =20 Vin ----| \________|\ 5V ----| / | \_____ Vout (0 - 5V) |/ 2V |--| / | |/ 5V | | | | | |-----| | | 6k | | |-----| | |____________| | |-----| | 4k | |-----| | | GND - Lon Howze -----Original Message----- From: sdcc-user-bounces@... = [mailto:sdcc-user-bounces@...] On Behalf Of Markos Sent: Thursday, March 08, 2007 10:22 AM To: sdcc-user@... Subject: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] Hello, The datasheet does not mention anything about the voltage=20 reference max input voltage. If you see in "electrical characteristic",=20 states that you cannot operate the device above 0.8V over VDD in IO = pins: VIH Input High Voltage I/O ports: D040 with TTL buffer 0.25 VDD + 0.8V Thats all i've found about it, because in the ADC chapter doesn't=20 mention anything about it. By the way: If I use two series resistor, say, I would divide the=20 voltage. If I divithe the voltage, say by 2, every bit in the=20 conversions must be muplitplied by two. Example: 5V Voltage reference, at 1024 bits (ADC resolution) gives me 4,8 mv = /bit. Lets imagine I connect a 10V batt with two 100k res. VIN will be 5V,=20 same as Vref, adc result all '1' . Here, every ADC step means 4,8 mv * 2 = (voltage divider) =3D 9,6 mV . Thats not accurate enough, because the = PIC=20 (and I think any ADC) specs says +- 1 LSB in the conversion. so, the=20 conversion could be at least +- 9,6 mV wrong, which is not suitable for=20 say Nimh batts, that require the charge to be cuttof when a 10mV curve=20 occurs. So, to summarize it, If I divide the voltage, I loose resolution=20 (inverse proportional). Same applies to the Op Amp, which will reduce=20 the voltage too, but with higher part count and cost ;-) Regards. -------- Mensaje original -------- Asunto: Re: [Sdcc-user] [OT] - ADC Ideas Fecha: Thu, 8 Mar 2007 11:46:51 -0300 De: C C Budden Responder a: sdcc-user@... Para: Referencias: <45EFCDC4.2030404@...> Hi Markos. Did Yoy take a look on the PIC datasheet? If you have a = Voltage=20 reference (2 pins) on the IC apart power supply, and in the datasheet = is=20 specified that can support 12 V with 5V on power supply, of course you = can. I didn=B4t see that PIC datasheet, but in case that you cannot use that=20 voltage reference range, you will have to make a conditioning signal = circuit=20 with an operational amplifier. Take care to not exed the specified ranges or damage of the device may=20 ocurr. On a simple way, if you use a couple of resistors use metal film = resistor=20 diu to the lower inductance they have compared with others. On most AD=20 imputs its not recommended to use caps, inductors exept you have the=20 impedances well separated. I hope this help you. Regards, Casiano. ----- Original Message -----=20 From: "Markos" To: Sent: Thursday, March 08, 2007 5:48 AM Subject: [Sdcc-user] [OT] - ADC Ideas > Hi guys, > maybe this is a little offtopic, but i'm sure you could > help me. I'm implementing a simple battery charger, and I need to > messaure voltages ranges from 0 to 12 V. > =BFCould I use the PIC integrated ADC to messaure above 5 V (provided = that > I use the voltage reference pins tied to 0 and 12 V, for example)? = Most > external ADC have a 0 to 5V input range.... > How would you guys solve this? Any Ideas? > > Thanks in advance. > > > = -------------------------------------------------------------------------= > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to = share=20 > your > opinions on IT & business topics through brief surveys-and earn cash > = http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > > __________ NOD32 1.1458 (20060324) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > >=20 -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV _______________________________________________ Sdcc-user mailing list Sdcc-user@... https://lists.sourceforge.net/lists/listinfo/sdcc-user -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV _______________________________________________ Sdcc-user mailing list Sdcc-user@... https://lists.sourceforge.net/lists/listinfo/sdcc-user ```
 Re: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] From: Lon Howze - ID - 2007-03-08 16:02:23 ```The circuit I described assumes you are only interested in the 7V to 12V = range. Also, it assumes the -V reference for the op-amp is GND. - Lon Howze -----Original Message----- From: sdcc-user-bounces@... = [mailto:sdcc-user-bounces@...] On Behalf Of Lon Howze = - ID Sent: Thursday, March 08, 2007 10:55 AM To: sdcc-user@... Subject: Re: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] Two op-amps configured as a difference amplifiers with a gain of 1 could = be cascaded to provide a full-scale voltage of 5V. This would give a = minimum reading of 7V with a maximum reading of 12V. Again you would = want to use the most precise resistors and op-amps you can afford in the = circuit. The 2V input to the second op-amp could be developed from a = resistor-divider network off the 5V supply as mentioned earlier. The = resistor values shown are just one example. Op-Amp 1: 12V - 5V =3D 7V Op-Amp 2: 7V - 2V =3D 5V |\ =20 Vin ----| \________|\ 5V ----| / | \_____ Vout (0 - 5V) |/ 2V |--| / | |/ 5V | | | | | |-----| | | 6k | | |-----| | |____________| | |-----| | 4k | |-----| | | GND - Lon Howze -----Original Message----- From: sdcc-user-bounces@... = [mailto:sdcc-user-bounces@...] On Behalf Of Markos Sent: Thursday, March 08, 2007 10:22 AM To: sdcc-user@... Subject: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] Hello, The datasheet does not mention anything about the voltage=20 reference max input voltage. If you see in "electrical characteristic",=20 states that you cannot operate the device above 0.8V over VDD in IO = pins: VIH Input High Voltage I/O ports: D040 with TTL buffer 0.25 VDD + 0.8V Thats all i've found about it, because in the ADC chapter doesn't=20 mention anything about it. By the way: If I use two series resistor, say, I would divide the=20 voltage. If I divithe the voltage, say by 2, every bit in the=20 conversions must be muplitplied by two. Example: 5V Voltage reference, at 1024 bits (ADC resolution) gives me 4,8 mv = /bit. Lets imagine I connect a 10V batt with two 100k res. VIN will be 5V,=20 same as Vref, adc result all '1' . Here, every ADC step means 4,8 mv * 2 = (voltage divider) =3D 9,6 mV . Thats not accurate enough, because the = PIC=20 (and I think any ADC) specs says +- 1 LSB in the conversion. so, the=20 conversion could be at least +- 9,6 mV wrong, which is not suitable for=20 say Nimh batts, that require the charge to be cuttof when a 10mV curve=20 occurs. So, to summarize it, If I divide the voltage, I loose resolution=20 (inverse proportional). Same applies to the Op Amp, which will reduce=20 the voltage too, but with higher part count and cost ;-) Regards. -------- Mensaje original -------- Asunto: Re: [Sdcc-user] [OT] - ADC Ideas Fecha: Thu, 8 Mar 2007 11:46:51 -0300 De: C C Budden Responder a: sdcc-user@... Para: Referencias: <45EFCDC4.2030404@...> Hi Markos. Did Yoy take a look on the PIC datasheet? If you have a = Voltage=20 reference (2 pins) on the IC apart power supply, and in the datasheet = is=20 specified that can support 12 V with 5V on power supply, of course you = can. I didn=B4t see that PIC datasheet, but in case that you cannot use that=20 voltage reference range, you will have to make a conditioning signal = circuit=20 with an operational amplifier. Take care to not exed the specified ranges or damage of the device may=20 ocurr. On a simple way, if you use a couple of resistors use metal film = resistor=20 diu to the lower inductance they have compared with others. On most AD=20 imputs its not recommended to use caps, inductors exept you have the=20 impedances well separated. I hope this help you. Regards, Casiano. ----- Original Message -----=20 From: "Markos" To: Sent: Thursday, March 08, 2007 5:48 AM Subject: [Sdcc-user] [OT] - ADC Ideas > Hi guys, > maybe this is a little offtopic, but i'm sure you could > help me. I'm implementing a simple battery charger, and I need to > messaure voltages ranges from 0 to 12 V. > =BFCould I use the PIC integrated ADC to messaure above 5 V (provided = that > I use the voltage reference pins tied to 0 and 12 V, for example)? = Most > external ADC have a 0 to 5V input range.... > How would you guys solve this? Any Ideas? > > Thanks in advance. > > > = -------------------------------------------------------------------------= > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to = share=20 > your > opinions on IT & business topics through brief surveys-and earn cash > = http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > > __________ NOD32 1.1458 (20060324) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > >=20 -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV _______________________________________________ Sdcc-user mailing list Sdcc-user@... https://lists.sourceforge.net/lists/listinfo/sdcc-user -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV _______________________________________________ Sdcc-user mailing list Sdcc-user@... https://lists.sourceforge.net/lists/listinfo/sdcc-user -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV _______________________________________________ Sdcc-user mailing list Sdcc-user@... https://lists.sourceforge.net/lists/listinfo/sdcc-user ```
 Re: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] From: Markos - 2007-03-08 16:53:57 ```Thanks Lon, good starting point: directly fully proportional 0-5v output. Lon Howze - ID escribió: > The circuit I described assumes you are only interested in the 7V to 12V range. Also, it assumes the -V reference for the op-amp is GND. > > - Lon Howze > > -----Original Message----- > From: sdcc-user-bounces@... [mailto:sdcc-user-bounces@...] On Behalf Of Lon Howze - ID > Sent: Thursday, March 08, 2007 10:55 AM > To: sdcc-user@... > Subject: Re: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] > > Two op-amps configured as a difference amplifiers with a gain of 1 could be cascaded to provide a full-scale voltage of 5V. This would give a minimum reading of 7V with a maximum reading of 12V. Again you would want to use the most precise resistors and op-amps you can afford in the circuit. The 2V input to the second op-amp could be developed from a resistor-divider network off the 5V supply as mentioned earlier. The resistor values shown are just one example. > > Op-Amp 1: 12V - 5V = 7V > Op-Amp 2: 7V - 2V = 5V > > > > |\ > Vin ----| \________|\ > 5V ----| / | \_____ Vout (0 - 5V) > |/ 2V |--| / > | |/ > 5V | > | | > | | > |-----| | > | 6k | | > |-----| | > |____________| > | > |-----| > | 4k | > |-----| > | > | > GND > > > > > > > > - Lon Howze > > -----Original Message----- > From: sdcc-user-bounces@... [mailto:sdcc-user-bounces@...] On Behalf Of Markos > Sent: Thursday, March 08, 2007 10:22 AM > To: sdcc-user@... > Subject: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] > > Hello, > The datasheet does not mention anything about the voltage > reference max input voltage. If you see in "electrical characteristic", > states that you cannot operate the device above 0.8V over VDD in IO pins: > > VIH Input High Voltage > I/O ports: > D040 with TTL buffer 0.25 VDD + 0.8V > > Thats all i've found about it, because in the ADC chapter doesn't > mention anything about it. > > By the way: If I use two series resistor, say, I would divide the > voltage. If I divithe the voltage, say by 2, every bit in the > conversions must be muplitplied by two. > Example: > 5V Voltage reference, at 1024 bits (ADC resolution) gives me 4,8 mv /bit. > Lets imagine I connect a 10V batt with two 100k res. VIN will be 5V, > same as Vref, adc result all '1' . Here, every ADC step means 4,8 mv * 2 > (voltage divider) = 9,6 mV . Thats not accurate enough, because the PIC > (and I think any ADC) specs says +- 1 LSB in the conversion. so, the > conversion could be at least +- 9,6 mV wrong, which is not suitable for > say Nimh batts, that require the charge to be cuttof when a 10mV curve > occurs. > > So, to summarize it, If I divide the voltage, I loose resolution > (inverse proportional). Same applies to the Op Amp, which will reduce > the voltage too, but with higher part count and cost ;-) > > Regards. > > > > > > -------- Mensaje original -------- > Asunto: Re: [Sdcc-user] [OT] - ADC Ideas > Fecha: Thu, 8 Mar 2007 11:46:51 -0300 > De: C C Budden > Responder a: sdcc-user@... > Para: > Referencias: <45EFCDC4.2030404@...> > > > > Hi Markos. Did Yoy take a look on the PIC datasheet? If you have a Voltage > reference (2 pins) on the IC apart power supply, and in the datasheet is > specified that can support 12 V with 5V on power supply, of course you can. > > I didn´t see that PIC datasheet, but in case that you cannot use that > voltage reference range, you will have to make a conditioning signal circuit > with an operational amplifier. > > Take care to not exed the specified ranges or damage of the device may > ocurr. > > On a simple way, if you use a couple of resistors use metal film resistor > diu to the lower inductance they have compared with others. On most AD > imputs its not recommended to use caps, inductors exept you have the > impedances well separated. > > I hope this help you. > > Regards, Casiano. > > > > > ----- Original Message ----- > From: "Markos" > To: > Sent: Thursday, March 08, 2007 5:48 AM > Subject: [Sdcc-user] [OT] - ADC Ideas > > > >> Hi guys, >> maybe this is a little offtopic, but i'm sure you could >> help me. I'm implementing a simple battery charger, and I need to >> messaure voltages ranges from 0 to 12 V. >> ¿Could I use the PIC integrated ADC to messaure above 5 V (provided that >> I use the voltage reference pins tied to 0 and 12 V, for example)? Most >> external ADC have a 0 to 5V input range.... >> How would you guys solve this? Any Ideas? >> >> Thanks in advance. >> >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share >> your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> Sdcc-user mailing list >> Sdcc-user@... >> https://lists.sourceforge.net/lists/listinfo/sdcc-user >> >> __________ NOD32 1.1458 (20060324) Information __________ >> >> This message was checked by NOD32 antivirus system. >> http://www.eset.com >> >> >> > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > > ```
 Re: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] From: Dave McGuire - 2007-03-08 21:19:41 ```On Mar 8, 2007, at 10:21 AM, Markos wrote: > The datasheet does not mention anything about the voltage > reference max input voltage. If you see in "electrical > characteristic", > states that you cannot operate the device above 0.8V over VDD in IO > pins: > > VIH Input High Voltage > I/O ports: > D040 with TTL buffer 0.25 VDD + 0.8V > > Thats all i've found about it, because in the ADC chapter doesn't > mention anything about it. Microchip (almost?) always lists an allowable range for the external Vref input in the datasheets. Which PIC chip are you using? > So, to summarize it, If I divide the voltage, I loose resolution > (inverse proportional). Same applies to the Op Amp, which will reduce > the voltage too, but with higher part count and cost ;-) ...and accuracy, and input impedance. OpAmps are hardly expensive these days. -Dave -- Dave McGuire Port Charlotte, FL ```
 Re: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] From: Markos - 2007-03-09 08:13:38 ```Pic is PIC18F252. Dave McGuire escribió: > On Mar 8, 2007, at 10:21 AM, Markos wrote: > >> The datasheet does not mention anything about the voltage >> reference max input voltage. If you see in "electrical >> characteristic", >> states that you cannot operate the device above 0.8V over VDD in IO >> pins: >> >> VIH Input High Voltage >> I/O ports: >> D040 with TTL buffer 0.25 VDD + 0.8V >> >> Thats all i've found about it, because in the ADC chapter doesn't >> mention anything about it. >> > > Microchip (almost?) always lists an allowable range for the > external Vref input in the datasheets. > > Which PIC chip are you using? > > >> So, to summarize it, If I divide the voltage, I loose resolution >> (inverse proportional). Same applies to the Op Amp, which will reduce >> the voltage too, but with higher part count and cost ;-) >> > > ...and accuracy, and input impedance. OpAmps are hardly expensive > these days. > > -Dave > > ```
 Re: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] From: Dave McGuire - 2007-03-09 08:44:44 ``` I'm reading the datasheet for the PIC18F252. On page 259, it =20 states that the maximum voltage on any pin (with a few exceptions) is =20= Vdd+0.3V. Later, on page 287, it specifies more specifically that =20 the maximum voltage for Vref (parameter A21) is also Vdd+0.3V. -Dave On Mar 9, 2007, at 3:13 AM, Markos wrote: > Pic is PIC18F252. > > Dave McGuire escribi=F3: >> On Mar 8, 2007, at 10:21 AM, Markos wrote: >> >>> The datasheet does not mention anything about the voltage >>> reference max input voltage. If you see in "electrical >>> characteristic", >>> states that you cannot operate the device above 0.8V over VDD in IO >>> pins: >>> >>> VIH Input High Voltage >>> I/O ports: >>> D040 with TTL buffer 0.25 VDD + 0.8V >>> >>> Thats all i've found about it, because in the ADC chapter doesn't >>> mention anything about it. >>> >> >> Microchip (almost?) always lists an allowable range for the >> external Vref input in the datasheets. >> >> Which PIC chip are you using? ... --=20 Dave McGuire Port Charlotte, FL ```
 Re: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] From: Ernst Bachmann - 2007-03-09 10:40:11 ```On Freitag, 9. M=E4rz 2007, Dave McGuire wrote: > I'm reading the datasheet for the PIC18F252. On page 259, it > states that the maximum voltage on any pin (with a few exceptions) is > Vdd+0.3V. Later, on page 287, it specifies more specifically that > the maximum voltage for Vref (parameter A21) is also Vdd+0.3V. > Those are the "absolute maximum ratings", and just mean you won't immediatl= y=20 destroy your =B5C when you apply Vdd+0.3V. The Device has clamping diodes to GND and VDD on each pin, so if you go abo= ve=20 their Vf, they'll simply start to conduct till the voltage drops or the=20 device burns. Usually those diodes are rated for 10-30mA, so with a high enough series=20 resistor you can use them in your Application (*), but don't count on the A= DC=20 working correctly/exact with Vref > Vdd. *) I have an circuit here applying 240V AC directly to an =B5C pin over a f= ew=20 100kOhms, providing a nice zero-crossing Interrupt, without any additional= =20 protection... /Ernst ```
 Re: [Sdcc-user] [Fwd: Re: [OT] - ADC Ideas] From: Dave McGuire - 2007-03-09 20:11:04 ```On Mar 9, 2007, at 5:39 AM, Ernst Bachmann wrote: >> I'm reading the datasheet for the PIC18F252. On page 259, it >> states that the maximum voltage on any pin (with a few exceptions) is >> Vdd+0.3V. Later, on page 287, it specifies more specifically that >> the maximum voltage for Vref (parameter A21) is also Vdd+0.3V. > > Those are the "absolute maximum ratings", and just mean you won't =20 > immediatly > destroy your =B5C when you apply Vdd+0.3V. Yes, I'm quite aware. I pointed it out as the ultimate reason why =20= pumping +12V into the Vref pin probably isn't what the original =20 posted really wanted to do. -Dave --=20 Dave McGuire Port Charlotte, FL ```