Did you use an RC filter on the Dac pin? Try this circuit: 1K BX-Pin o-----/\/\/\/\/\---o----o DAC Out | | ____ ____ .1uF cap | | ------ --- - Ground Hopefully if my tabs aren't cut off you will see the circuit. You connect a 1K resistor to your BX i/o pin, the other end of the resistor is connected to a .1uF cap to ground. The smoothed analog voltage is present at the resistor capacitor junction. Chris ----- Original Message ----- From: "Sebastian P. E." <> To: <> Sent: Saturday, October 18, 2003 10:11 AM Subject: [BasicX] PutDAC - strange voltages > Hi > I just tried the PutDAC command for the first time. > I set up 6 pins to deliver different voltages from 1 to 5V but didn't > really get the results I had expected. > The actual voltages are listed below: > > PIN Number, NondimVolt, Actual voltage Should have been > 13 0.2 0.23V 1.0V > 14 0.4 0.24V 2.0V > 15 0.5 0.19V 2.5V > 16 0.6 0.35V 3.0V > 17 0.8 0.15V 4.0V > 18 1.0 0.17V 5.0V > > This shouldn't be the case though according to the documentation which > states that a nondimvoltage of 1.0 should give the pin an output of 5V! > I continuously refreshed the states of the 6 different pins just to make > sure the voltage stayed the same. > > Another weird thing is that my multimeter wouldn't measure the voltage > if I didn't use the ground on the developer board. I tried with a > different ground supplied by another power source as well, but it didn't > give me any results at all! Any reason why this shouldn't work? > > Best regards > Sebastian Probst Eide > > ">http://docs.yahoo.com/info/terms/ > > |
|
Re: PutDAC - strange voltages
Started by ●October 14, 2003
Reply by ●October 14, 20032003-10-14
--- In , "Sebastian P. E." <dingutt@d...> wrote: > What does it actually do? Why can't you just connect to the pin? According to the manual: "A rapid set of pulses is precisely timed to produce the desired voltage. A simple low pass filter is needed externally to filter the output." If you connect to the pin, your meter will be "seeing" the pulse stream. That's probably not what your meter wants to see. Also, the capacitor in the filter will help to hold the voltage level (the DAC output pin is put in a high impedance state) but it will drain off over time depending on the load. The manual continues: "The external filter circuit is relied upon to maintain the voltage between calls. PutDAC should be called periodically to refresh the pin and keep the voltage within tolerances." My application needs a DAC and I at first thought that PutDAC might do the job. However, the requirement to periodically refresh the voltage is untenable in my application so I decided to use a separate DAC instead. The one that I have tentatively chosen is the LTC1451 (data sheet here: http://www.linear.com/pdf/145123fs.pdf). It's a small package with a fairly simple interface. I haven't actually tried it yet, though. There are DACs with other interfaces like SPI, 1-wire, parallel, etc. Other manufacturers make them as well, e.g. Maxim. A selection guide for Linear Technology DACs may be found here: http://www.linear.com/pdf/dacs_all.pdf. Information for Dallas/Maxim may be found here: http://www.maxim-ic.com/ADCDACRef.cfm. Don in Portland |
|
Reply by ●October 15, 20032003-10-15
--- In , "Sebastian P. E." <dingutt@d...> wrote: > Hi again Chris and everybody else reading this post. > I built a low pass filter as you described below but I still get strange > voltages. > I used a 1K resistor and connected it to a cap. which was connected to > ground. I measured the voltage at the resistor capacitor junction as > you told me to. > I tried with two different nondimVolt values: 0.2 and 1.0, but they both > returned a voltage of 0.48V. :-( > > The capacitors I tried, the only ones I could get here in Norway today, > had the following values: 47u and 220u > > Any ideas what could be wrong? > > Best regards > Sebastian Probst Eide The original "ascii art" diagram didn't come out as it was intended. Make sure that the 1K resistor connects from the BX-24 pin to the + side of the capacitor (I'm assuming that the caps are electrolytic given the values that you gave). The - side of the capacitor should be grounded. You should connect your meter (better yet, an oscilloscope) to the junction of the resistor and capacitor. Note that once the capacitor is charged up by the PutDAC function, the voltage will decay over time according the the equation V = Vi * e ^ (-t / R * C) where Vi is the initial voltage, e is the familiar transcendental constant, t is the time (in seconds), R is the load resistance (in ohms) and C is the capacitor value (in farads). Doing the math, assuming a 47uF capacitor and a 10K ohm load, after 1 second of not being refreshed the voltage will be down to 12% of its initial value. As a side note, I think that the 47uF capacitor is a bit large. I'm not sure how the PutDAC command actually works but it has to charge and discharge the capacitor through the series resistor. The larger the capacitor, the longer it will take to get the capacitor charged up to the requested voltage. On the other hand, a larger capacitor will maintain longer its charge above some percentage of the full charge level. I would try a smaller capacitor; closer to the 0.1uF value originally suggested. This would most likely be a ceramic disc capacitor and should be available at any hobby or commercial electronics source. Don in Portland, OR |
Reply by ●October 15, 20032003-10-15
Make sure the ground on BOTH boards are joined together. Sebastian P. E. wrote: > I am sorry that I am bothering you with this boring problem, but I > really have to get this to work... Please keep on being patient with me > and the mistakes I might make, I a newbie... > > I just tested a couple of things on my two development boards and got > some strange results which kind of made it no wonder that I got strange > voltage results on my earlier tests. I can't see why I get the results > though... > > I have got two separately powered development boards, a dev board for > the basicX chip, and a normal solderless breadboard. > > When I measure the voltage between the: > -5+ and the gnd on the dev board I get: 4.98V > -Positive pole on the solderless board and the negative gnd on the > s.board I get: 6.06V (That is correct!) > -Positive pole on the s.board and gnd on the dev board while the chip is > in the dev board, I get: 0V (Should have been 6.06V as with the gnd on > the s.board!) > -5+ on the dev board and the gnd on the solderless board I get: 0.28V > (should have been 4.98V!) > -gnd on the dev board and the gnd on the s.board I get: -0.38V! (should > have been 0.0V!!) > -PIN 13 while on dev board and gnd on dev board I get: 0.38V > -Capacitor connected to the low pass circuit connected to PIN 13 and gnd > on dev board I get: 0.38V > -Capacitor connected to the low pass circuit connected to PIN 13 and gnd > on s.board I get: 0.00V > I am including the program just in case you want to see it, I can't see > why the error should be in the coding though, but just in case. > The circuit I am using is still exactly the one shown me earlier by > Chris: > > 1K > BX-Pin o-----/\/\/\/\/\---o----o DAC Out > | > | > ____ > ____ .1uF cap > | > | > ------ > --- > - Ground > > > Here is the code on the chip: > What it does is sending a voltage for 8 seconds before it is starting to > send another voltage. > The red LED is blinking at different speeds for the different voltages > to indicate the state of the program. > First it is sending a nondimvolt of 0.2, then 0.4, then 0.6, then 0.8 > and at last 1.0 before it is starting at 0.2 again. > > I am sorry that I wrote the comments in Norwegian, but I originally had > no intentions posting the code to this forum. > Option Explicit > 'Dette er fst og fremst et lite program som jeg skal bruke for > 'se hvor mye str denne saken per ut... > > '************************************************ > 'Variabler jeg kommer til trenge gjennom programmet > dim bLys as boolean > const nLys as byte = 25 > const voltagePin as byte = 13 > dim voltage13counter as byte > Dim Teller as byte > Dim NonDimVolt as byte > Dim LysTaskStack(1 to 32) as byte > Const MaksRunder as byte = 4 > > '************************************************ > 'Hoveddelen > Public Sub Main() > > 'Kaller startfunksjonen > Call Init() > > Debug.Print "Programmet kjer" > bLysse > > '*********************** > CallTask "lysTask", lysTaskStack > > '*********************** > Do > If teller=MaksRunder then > Teller=0 > > If NonDimVolt <> 5 then > NonDimVolt=NonDimVolt+1 > Else > NonDimVolt=1 > End if > > End if > > Debug.Print "Setter voltage. "; > Debug.Print "NonDimVolt er "; cstr(NonDimVolt); > Debug.Print ". Sove: "; cstr((csng(NonDimVolt))*0.1); > 'Stygg lning, men det andre fungerte jo ikke... > Select Case NonDimVolt > Case 1 > Debug.Print " ---- Case 1" > Call PutDAC(voltagePin, 0.2, voltage13counter) > Case 2 > Debug.Print " ---- Case 2" > Call PutDAC(voltagePin, 0.4, voltage13counter) > Case 3 > Debug.Print " ---- Case 3" > Call PutDAC(voltagePin, 0.6, voltage13counter) > Case 4 > Debug.Print " ---- Case 4" > Call PutDAC(voltagePin, 0.8, voltage13counter) > Case 5 > Debug.Print " ---- Case 5" > Call PutDAC(voltagePin, 1.0, voltage13counter) > End select > > Call Sleep (2.0) > Teller=Teller+1 > Loop > > End Sub > > '************************************************ > Sub Init() > 'Dette er en sak som setter variablene slik jeg vil ha dem > Teller = 0 > NonDimVolt=1 > > 'Bekrefter at funksjonen har vt kjt... > Debug.Print "Init kjt." > End Sub > > '************************************************ > Sub lysTask() > > Do > > If bLys then > Call PutPin(nLys,0) > Else > Call PutPin(nLys,1) > End if > > bLys = Not bLys > > Call Sleep((csng(NonDimVolt))*0.1) > Loop > > end sub > Best regards > Sebastian Probst Eide > > -----Original Message----- > From: Sebastian P. E. [mailto:] > Sent: 16. oktober 2003 20:06 > To: > Subject: RE: [BasicX] PutDAC - strange voltages :( > > Well... this is really weird... > I put the BX-24 chip on my solder less breadboard and made the red LED > blink every time the PutDAC command was called so I would know if the > chip really was turned on. The program was the same I used when testing > on the dev board shipped with the chip. The LED started blinking as it > was supposed to, but there was no output at pin 13 although there had > been one while the chip was on the dev board. I even tried connecting a > wire directly to the pin to make sure there was a connection. I didn't > even get the strange voltages I previously complained about; I just got > a blank 0. > > If any of you guys has any idea what I might be doing wrong, please let > me know. I'll prototype a bit more in the meantime. > > I went over all the different connections on the board multiple times to > ensure I hadn't done anything wrong. > When the voltage was tested against the positive connection spot on the > board it showed the input voltage of the board, and when connected to > the negative spot it just showed 0. > > Best regards > Sebastian Probst Eide > > -----Original Message----- > From: Sebastian P. E. [mailto:] > Sent: 16. oktober 2003 19:24 > To: > Subject: RE: [BasicX] PutDAC - strange voltages :( > > Hi again Chris and everybody else reading this post. > I built a low pass filter as you described below but I still get strange > voltages. > I used a 1K resistor and connected it to a cap. which was connected to > ground. I measured the voltage at the resistor capacitor junction as > you told me to. > I tried with two different nondimVolt values: 0.2 and 1.0, but they both > returned a voltage of 0.48V. :-( > > The capacitors I tried, the only ones I could get here in Norway today, > had the following values: 47u and 220u > > Any ideas what could be wrong? > > Best regards > Sebastian Probst Eide > -----Original Message----- > From: Chris [mailto:] > Sent: 14. oktober 2003 19:33 > To: > Subject: Re: [BasicX] PutDAC - strange voltages > > Did you use an RC filter on the Dac pin? > > Try this circuit: > > 1K > BX-Pin o-----/\/\/\/\/\---o----o DAC Out > | > | > ____ > ____ .1uF cap > | > | > ------ > --- > - Ground > > Hopefully if my tabs aren't cut off you will see the circuit. > You connect a 1K resistor to your BX i/o pin, the other > end of the resistor is connected to a .1uF cap to ground. > The smoothed analog voltage is present at the resistor > capacitor junction. > > Chris > > > ----- Original Message ----- > From: "Sebastian P. E." <> > To: <> > Sent: Saturday, October 18, 2003 10:11 AM > Subject: [BasicX] PutDAC - strange voltages > > Hi > > I just tried the PutDAC command for the first time. > > I set up 6 pins to deliver different voltages from 1 to 5V but didn't > > really get the results I had expected. > > The actual voltages are listed below: > > > > PIN Number, NondimVolt, Actual voltage Should have been > > 13 0.2 0.23V 1.0V > > 14 0.4 0.24V 2.0V > > 15 0.5 0.19V 2.5V > > 16 0.6 0.35V 3.0V > > 17 0.8 0.15V 4.0V > > 18 1.0 0.17V 5.0V > > > > This shouldn't be the case though according to the documentation which > > states that a nondimvoltage of 1.0 should give the pin an output of > 5V! > > I continuously refreshed the states of the 6 different pins just to > make > > sure the voltage stayed the same. > > > > Another weird thing is that my multimeter wouldn't measure the voltage > > if I didn't use the ground on the developer board. I tried with a > > different ground supplied by another power source as well, but it > didn't > > give me any results at all! Any reason why this shouldn't work? > > > > Best regards > > Sebastian Probst Eide > > > > > > > > > > > > > > > > > > > > ">http://docs.yahoo.com/info/terms/ > > > > > > > > > > <http://rd.yahoo.com/M%1812.4024216.5238180.1261774/D=egroupweb/S06 > 554205:HM/A54451/R=0/SIGtmlldst/*http:/www.netflix.com/Default?mqs > o`178323&partid@24216> click here > <http://us.adserver.yahoo.com/l?M%1812.4024216.5238180.1261774/D=egrou > pmail/S=:HM/A54451/rand72211947> > > ">http://docs.yahoo.com/info/terms/> Service. > > > <http://rd.yahoo.com/M$4522.3707890.4968055.1261774/D=egroupweb/S06 > 554205:HM/A95056/R=0/SIG4p07ne0/*http:/ashnin.com/clk/muryutaitake > nattogyo?YH707890&yhad95056> Click Here! > <http://us.adserver.yahoo.com/l?M$4522.3707890.4968055.1261774/D=egrou > pmail/S=:HM/A95056/rand5126111> > > ">http://docs.yahoo.com/info/terms/> Service. > > > <http://rd.yahoo.com/M$4522.3707890.4968055.1261774/D=egroupweb/S06 > 554205:HM/A95055/R=0/SIG4j83ehr/*http:/ashnin.com/clk/muryutaitake > nattogyo?YH707890&yhad95055> Click Here! > <http://us.adserver.yahoo.com/l?M$4522.3707890.4968055.1261774/D=egrou > pmail/S=:HM/A95055/randS9757973> > > ">http://docs.yahoo.com/info/terms/> Service. > Yahoo! Groups Sponsor > <http://hits.411web.com/cgi-bin/autoredir?campU6&lineid614674&prop=egroupweb&pos=HM" target="_blank" rel="nofollow">http://rd.yahoo.com/M%9395.3614674.4902533.1261774/D=egroupweb/S06554205:HM/A24963/R=0/SIGo885gmo/*http://hits.411web.com/cgi-bin/autoredir?campU6&lineid614674&prop=egroupweb&pos=HM > > ">http://docs.yahoo.com/info/terms/>. |
|
Reply by ●October 16, 20032003-10-16
Hi again Chris and everybody else reading this post. I built a low pass filter as you described below but I still get strange voltages. I used a 1K resistor and connected it to a cap. which was connected to ground. I measured the voltage at the resistor capacitor junction as you told me to. I tried with two different nondimVolt values: 0.2 and 1.0, but they both returned a voltage of 0.48V. :-( The capacitors I tried, the only ones I could get here in Norway today, had the following values: 47u and 220u Any ideas what could be wrong? Best regards Sebastian Probst Eide -----Original Message----- From: Chris [mailto:] Sent: 14. oktober 2003 19:33 To: Subject: Re: [BasicX] PutDAC - strange voltages Did you use an RC filter on the Dac pin? Try this circuit: 1K BX-Pin o-----/\/\/\/\/\---o----o DAC Out | | ____ ____ .1uF cap | | ------ --- - Ground Hopefully if my tabs aren't cut off you will see the circuit. You connect a 1K resistor to your BX i/o pin, the other end of the resistor is connected to a .1uF cap to ground. The smoothed analog voltage is present at the resistor capacitor junction. Chris ----- Original Message ----- From: "Sebastian P. E." <> To: <> Sent: Saturday, October 18, 2003 10:11 AM Subject: [BasicX] PutDAC - strange voltages > Hi > I just tried the PutDAC command for the first time. > I set up 6 pins to deliver different voltages from 1 to 5V but didn't > really get the results I had expected. > The actual voltages are listed below: > > PIN Number, NondimVolt, Actual voltage Should have been > 13 0.2 0.23V 1.0V > 14 0.4 0.24V 2.0V > 15 0.5 0.19V 2.5V > 16 0.6 0.35V 3.0V > 17 0.8 0.15V 4.0V > 18 1.0 0.17V 5.0V > > This shouldn't be the case though according to the documentation which > states that a nondimvoltage of 1.0 should give the pin an output of 5V! > I continuously refreshed the states of the 6 different pins just to make > sure the voltage stayed the same. > > Another weird thing is that my multimeter wouldn't measure the voltage > if I didn't use the ground on the developer board. I tried with a > different ground supplied by another power source as well, but it didn't > give me any results at all! Any reason why this shouldn't work? > > Best regards > Sebastian Probst Eide > > ">http://docs.yahoo.com/info/terms/ > <http://rd.yahoo.com/M%1812.4024216.5238180.1261774/D=egroupweb/S06 554205:HM/A54451/R=0/SIGtmlldst/*http:/www.netflix.com/Default?mqs o`178323&partid@24216> click here <http://us.adserver.yahoo.com/l?M%1812.4024216.5238180.1261774/D=egrou pmail/S=:HM/A54451/rand72211947> ">http://docs.yahoo.com/info/terms/> Service. |
|
Reply by ●October 16, 20032003-10-16
Well... this is really weird... I put the BX-24 chip on my solder less breadboard and made the red LED blink every time the PutDAC command was called so I would know if the chip really was turned on. The program was the same I used when testing on the dev board shipped with the chip. The LED started blinking as it was supposed to, but there was no output at pin 13 although there had been one while the chip was on the dev board. I even tried connecting a wire directly to the pin to make sure there was a connection. I didn't even get the strange voltages I previously complained about; I just got a blank 0. If any of you guys has any idea what I might be doing wrong, please let me know. I'll prototype a bit more in the meantime. I went over all the different connections on the board multiple times to ensure I hadn't done anything wrong. When the voltage was tested against the positive connection spot on the board it showed the input voltage of the board, and when connected to the negative spot it just showed 0. Best regards Sebastian Probst Eide -----Original Message----- From: Sebastian P. E. [mailto:] Sent: 16. oktober 2003 19:24 To: Subject: RE: [BasicX] PutDAC - strange voltages :( Hi again Chris and everybody else reading this post. I built a low pass filter as you described below but I still get strange voltages. I used a 1K resistor and connected it to a cap. which was connected to ground. I measured the voltage at the resistor capacitor junction as you told me to. I tried with two different nondimVolt values: 0.2 and 1.0, but they both returned a voltage of 0.48V. :-( The capacitors I tried, the only ones I could get here in Norway today, had the following values: 47u and 220u Any ideas what could be wrong? Best regards Sebastian Probst Eide -----Original Message----- From: Chris [mailto:] Sent: 14. oktober 2003 19:33 To: Subject: Re: [BasicX] PutDAC - strange voltages Did you use an RC filter on the Dac pin? Try this circuit: 1K BX-Pin o-----/\/\/\/\/\---o----o DAC Out | | ____ ____ .1uF cap | | ------ --- - Ground Hopefully if my tabs aren't cut off you will see the circuit. You connect a 1K resistor to your BX i/o pin, the other end of the resistor is connected to a .1uF cap to ground. The smoothed analog voltage is present at the resistor capacitor junction. Chris ----- Original Message ----- From: "Sebastian P. E." <> To: <> Sent: Saturday, October 18, 2003 10:11 AM Subject: [BasicX] PutDAC - strange voltages > Hi > I just tried the PutDAC command for the first time. > I set up 6 pins to deliver different voltages from 1 to 5V but didn't > really get the results I had expected. > The actual voltages are listed below: > > PIN Number, NondimVolt, Actual voltage Should have been > 13 0.2 0.23V 1.0V > 14 0.4 0.24V 2.0V > 15 0.5 0.19V 2.5V > 16 0.6 0.35V 3.0V > 17 0.8 0.15V 4.0V > 18 1.0 0.17V 5.0V > > This shouldn't be the case though according to the documentation which > states that a nondimvoltage of 1.0 should give the pin an output of 5V! > I continuously refreshed the states of the 6 different pins just to make > sure the voltage stayed the same. > > Another weird thing is that my multimeter wouldn't measure the voltage > if I didn't use the ground on the developer board. I tried with a > different ground supplied by another power source as well, but it didn't > give me any results at all! Any reason why this shouldn't work? > > Best regards > Sebastian Probst Eide > > ">http://docs.yahoo.com/info/terms/ > <http://rd.yahoo.com/M%1812.4024216.5238180.1261774/D=egroupweb/S06 554205:HM/A54451/R=0/SIGtmlldst/*http:/www.netflix.com/Default?mqs o`178323&partid@24216> click here <http://us.adserver.yahoo.com/l?M%1812.4024216.5238180.1261774/D=egrou pmail/S=:HM/A54451/rand72211947> ">http://docs.yahoo.com/info/terms/> Service. <http://rd.yahoo.com/M$4522.3707890.4968055.1261774/D=egroupweb/S06 554205:HM/A95056/R=0/SIG4p07ne0/*http:/ashnin.com/clk/muryutaitake nattogyo?YH707890&yhad95056> Click Here! <http://us.adserver.yahoo.com/l?M$4522.3707890.4968055.1261774/D=egrou pmail/S=:HM/A95056/rand5126111> ">http://docs.yahoo.com/info/terms/> Service. |
|
Reply by ●October 16, 20032003-10-16
I am sorry that I am bothering you with this boring problem, but I really have to get this to work Please keep on being patient with me and the mistakes I might make, I a newbie I just tested a couple of things on my two development boards and got some strange results which kind of made it no wonder that I got strange voltage results on my earlier tests. I cant see why I get the results though I have got two separately powered development boards, a dev board for the basicX chip, and a normal solderless breadboard. When I measure the voltage between the: -5+ and the gnd on the dev board I get: 4.98V -Positive pole on the solderless board and the negative gnd on the s.board I get: 6.06V (That is correct!) -Positive pole on the s.board and gnd on the dev board while the chip is in the dev board, I get: 0V (Should have been 6.06V as with the gnd on the s.board!) -5+ on the dev board and the gnd on the solderless board I get: 0.28V (should have been 4.98V!) -gnd on the dev board and the gnd on the s.board I get: -0.38V! (should have been 0.0V!!) -PIN 13 while on dev board and gnd on dev board I get: 0.38V -Capacitor connected to the low pass circuit connected to PIN 13 and gnd on dev board I get: 0.38V -Capacitor connected to the low pass circuit connected to PIN 13 and gnd on s.board I get: 0.00V I am including the program just in case you want to see it, I cant see why the error should be in the coding though, but just in case. The circuit I am using is still exactly the one shown me earlier by Chris: 1K BX-Pin o-----/\/\/\/\/\---o----o DAC Out | | ____ ____ .1uF cap | | ------ --- - Ground Here is the code on the chip: What it does is sending a voltage for 8 seconds before it is starting to send another voltage. The red LED is blinking at different speeds for the different voltages to indicate the state of the program. First it is sending a nondimvolt of 0.2, then 0.4, then 0.6, then 0.8 and at last 1.0 before it is starting at 0.2 again. I am sorry that I wrote the comments in Norwegian, but I originally had no intentions posting the code to this forum. Option Explicit 'Dette er fst og fremst et lite program som jeg skal bruke for 'se hvor mye str denne saken per ut... '************************************************ 'Variabler jeg kommer til trenge gjennom programmet dim bLys as boolean const nLys as byte = 25 const voltagePin as byte = 13 dim voltage13counter as byte Dim Teller as byte Dim NonDimVolt as byte Dim LysTaskStack(1 to 32) as byte Const MaksRunder as byte = 4 '************************************************ 'Hoveddelen Public Sub Main() 'Kaller startfunksjonen Call Init() Debug.Print "Programmet kjer" bLysse '*********************** CallTask "lysTask", lysTaskStack '*********************** Do If teller=MaksRunder then Teller=0 If NonDimVolt <> 5 then NonDimVolt=NonDimVolt+1 Else NonDimVolt=1 End if End if Debug.Print "Setter voltage. "; Debug.Print "NonDimVolt er "; cstr(NonDimVolt); Debug.Print ". Sove: "; cstr((csng(NonDimVolt))*0.1); 'Stygg lning, men det andre fungerte jo ikke... Select Case NonDimVolt Case 1 Debug.Print " ---- Case 1" Call PutDAC(voltagePin, 0.2, voltage13counter) Case 2 Debug.Print " ---- Case 2" Call PutDAC(voltagePin, 0.4, voltage13counter) Case 3 Debug.Print " ---- Case 3" Call PutDAC(voltagePin, 0.6, voltage13counter) Case 4 Debug.Print " ---- Case 4" Call PutDAC(voltagePin, 0.8, voltage13counter) Case 5 Debug.Print " ---- Case 5" Call PutDAC(voltagePin, 1.0, voltage13counter) End select Call Sleep (2.0) Teller=Teller+1 Loop End Sub '************************************************ Sub Init() 'Dette er en sak som setter variablene slik jeg vil ha dem Teller = 0 NonDimVolt=1 'Bekrefter at funksjonen har vt kjt... Debug.Print "Init kjt." End Sub '************************************************ Sub lysTask() Do If bLys then Call PutPin(nLys,0) Else Call PutPin(nLys,1) End if bLys = Not bLys Call Sleep((csng(NonDimVolt))*0.1) Loop end sub Best regards Sebastian Probst Eide -----Original Message----- From: Sebastian P. E. [mailto:] Sent: 16. oktober 2003 20:06 To: Subject: RE: [BasicX] PutDAC - strange voltages :( Well... this is really weird... I put the BX-24 chip on my solder less breadboard and made the red LED blink every time the PutDAC command was called so I would know if the chip really was turned on. The program was the same I used when testing on the dev board shipped with the chip. The LED started blinking as it was supposed to, but there was no output at pin 13 although there had been one while the chip was on the dev board. I even tried connecting a wire directly to the pin to make sure there was a connection. I didn't even get the strange voltages I previously complained about; I just got a blank 0. If any of you guys has any idea what I might be doing wrong, please let me know. I'll prototype a bit more in the meantime. I went over all the different connections on the board multiple times to ensure I hadn't done anything wrong. When the voltage was tested against the positive connection spot on the board it showed the input voltage of the board, and when connected to the negative spot it just showed 0. Best regards Sebastian Probst Eide -----Original Message----- From: Sebastian P. E. [mailto:] Sent: 16. oktober 2003 19:24 To: Subject: RE: [BasicX] PutDAC - strange voltages :( Hi again Chris and everybody else reading this post. I built a low pass filter as you described below but I still get strange voltages. I used a 1K resistor and connected it to a cap. which was connected to ground. I measured the voltage at the resistor capacitor junction as you told me to. I tried with two different nondimVolt values: 0.2 and 1.0, but they both returned a voltage of 0.48V. :-( The capacitors I tried, the only ones I could get here in Norway today, had the following values: 47u and 220u Any ideas what could be wrong? Best regards Sebastian Probst Eide -----Original Message----- From: Chris [mailto:] Sent: 14. oktober 2003 19:33 To: Subject: Re: [BasicX] PutDAC - strange voltages Did you use an RC filter on the Dac pin? Try this circuit: 1K BX-Pin o-----/\/\/\/\/\---o----o DAC Out | | ____ ____ .1uF cap | | ------ --- - Ground Hopefully if my tabs aren't cut off you will see the circuit. You connect a 1K resistor to your BX i/o pin, the other end of the resistor is connected to a .1uF cap to ground. The smoothed analog voltage is present at the resistor capacitor junction. Chris ----- Original Message ----- From: "Sebastian P. E." <> To: <> Sent: Saturday, October 18, 2003 10:11 AM Subject: [BasicX] PutDAC - strange voltages > Hi > I just tried the PutDAC command for the first time. > I set up 6 pins to deliver different voltages from 1 to 5V but didn't > really get the results I had expected. > The actual voltages are listed below: > > PIN Number, NondimVolt, Actual voltage Should have been > 13 0.2 0.23V 1.0V > 14 0.4 0.24V 2.0V > 15 0.5 0.19V 2.5V > 16 0.6 0.35V 3.0V > 17 0.8 0.15V 4.0V > 18 1.0 0.17V 5.0V > > This shouldn't be the case though according to the documentation which > states that a nondimvoltage of 1.0 should give the pin an output of 5V! > I continuously refreshed the states of the 6 different pins just to make > sure the voltage stayed the same. > > Another weird thing is that my multimeter wouldn't measure the voltage > if I didn't use the ground on the developer board. I tried with a > different ground supplied by another power source as well, but it didn't > give me any results at all! Any reason why this shouldn't work? > > Best regards > Sebastian Probst Eide > > ">http://docs.yahoo.com/info/terms/ > <http://rd.yahoo.com/M%1812.4024216.5238180.1261774/D=egroupweb/S06 554205:HM/A54451/R=0/SIGtmlldst/*http:/www.netflix.com/Default?mqs o`178323&partid@24216> click here <http://us.adserver.yahoo.com/l?M%1812.4024216.5238180.1261774/D=egrou pmail/S=:HM/A54451/rand72211947> ">http://docs.yahoo.com/info/terms/> Service. <http://rd.yahoo.com/M$4522.3707890.4968055.1261774/D=egroupweb/S06 554205:HM/A95056/R=0/SIG4p07ne0/*http:/ashnin.com/clk/muryutaitake nattogyo?YH707890&yhad95056> Click Here! <http://us.adserver.yahoo.com/l?M$4522.3707890.4968055.1261774/D=egrou pmail/S=:HM/A95056/rand5126111> ">http://docs.yahoo.com/info/terms/> Service. <http://rd.yahoo.com/M$4522.3707890.4968055.1261774/D=egroupweb/S06 554205:HM/A95055/R=0/SIG4j83ehr/*http:/ashnin.com/clk/muryutaitake nattogyo?YH707890&yhad95055> Click Here! <http://us.adserver.yahoo.com/l?M$4522.3707890.4968055.1261774/D=egrou pmail/S=:HM/A95055/randS9757973> ">http://docs.yahoo.com/info/terms/> Service. |
|
Reply by ●October 17, 20032003-10-17
Sebastian,
You need to call PutDac every 5-20 milliseconds to maintain the voltage. In your old program it looked like you only called it every 2 seconds. Chris ----- Original Message ----- From: "Sebastian P. E." <> To: <> Sent: Saturday, October 18, 2003 11:07 AM Subject: RE: [BasicX] PutDAC - strange voltages :( I finally got my hands on a couple of .1uF caps, but the results are still not as good as they should be! With a .1uF I get voltages between 0.2 and 0.8V while I with a 0.01uF get voltages at around 0.1-0.5V. With a 10uF I get voltages at about 0.20-0.35V… Any thing that could solve the problem and give me the correct voltages at up to 5V would be great! Best regards Sebastian Probst Eide -----Original Message----- From: Neil Jepsen [mailto:] Sent: 16. oktober 2003 04:28 To: Subject: Re: [BasicX] PutDAC - strange voltages :( Make sure the ground on BOTH boards are joined together. Sebastian P. E. wrote: > I am sorry that I am bothering you with this boring problem, but I > really have to get this to work... Please keep on being patient with me > and the mistakes I might make, I a newbie... > > I just tested a couple of things on my two development boards and got > some strange results which kind of made it no wonder that I got strange > voltage results on my earlier tests. I can't see why I get the results > though... > > I have got two separately powered development boards, a dev board for > the basicX chip, and a normal solderless breadboard. > > When I measure the voltage between the: > -5+ and the gnd on the dev board I get: 4.98V > -Positive pole on the solderless board and the negative gnd on the > s.board I get: 6.06V (That is correct!) > -Positive pole on the s.board and gnd on the dev board while the chip is > in the dev board, I get: 0V (Should have been 6.06V as with the gnd on > the s.board!) > -5+ on the dev board and the gnd on the solderless board I get: 0.28V > (should have been 4.98V!) > -gnd on the dev board and the gnd on the s.board I get: -0.38V! (should > have been 0.0V!!) > -PIN 13 while on dev board and gnd on dev board I get: 0.38V > -Capacitor connected to the low pass circuit connected to PIN 13 and gnd > on dev board I get: 0.38V > -Capacitor connected to the low pass circuit connected to PIN 13 and gnd > on s.board I get: 0.00V > I am including the program just in case you want to see it, I can't see > why the error should be in the coding though, but just in case. > The circuit I am using is still exactly the one shown me earlier by > Chris: > > 1K > BX-Pin o-----/\/\/\/\/\---o----o DAC Out > | > | > ____ > ____ .1uF cap > | > | > ------ > --- > - Ground > > > Here is the code on the chip: > What it does is sending a voltage for 8 seconds before it is starting to > send another voltage. > The red LED is blinking at different speeds for the different voltages > to indicate the state of the program. > First it is sending a nondimvolt of 0.2, then 0.4, then 0.6, then 0.8 > and at last 1.0 before it is starting at 0.2 again. > > I am sorry that I wrote the comments in Norwegian, but I originally had > no intentions posting the code to this forum. > Option Explicit > 'Dette er først og fremst et lite program som jeg skal bruke for > 'å se hvor mye strøm denne saken pøser ut... > > '************************************************ > 'Variabler jeg kommer til å trenge gjennom programmet > dim bLys as boolean > const nLys as byte = 25 > const voltagePin as byte = 13 > dim voltage13counter as byte > Dim Teller as byte > Dim NonDimVolt as byte > Dim LysTaskStack(1 to 32) as byte > Const MaksRunder as byte = 4 > > '************************************************ > 'Hoveddelen > Public Sub Main() > > 'Kaller startfunksjonen > Call Init() > > Debug.Print "Programmet kjører" > bLysse > > '*********************** > CallTask "lysTask", lysTaskStack > > '*********************** > Do > If teller=MaksRunder then > Teller=0 > > If NonDimVolt <> 5 then > NonDimVolt=NonDimVolt+1 > Else > NonDimVolt=1 > End if > > End if > > Debug.Print "Setter voltage. "; > Debug.Print "NonDimVolt er "; cstr(NonDimVolt); > Debug.Print ". Sove: "; cstr((csng(NonDimVolt))*0.1); > 'Stygg løsning, men det andre fungerte jo ikke... > Select Case NonDimVolt > Case 1 > Debug.Print " ---- Case 1" > Call PutDAC(voltagePin, 0.2, voltage13counter) > Case 2 > Debug.Print " ---- Case 2" > Call PutDAC(voltagePin, 0.4, voltage13counter) > Case 3 > Debug.Print " ---- Case 3" > Call PutDAC(voltagePin, 0.6, voltage13counter) > Case 4 > Debug.Print " ---- Case 4" > Call PutDAC(voltagePin, 0.8, voltage13counter) > Case 5 > Debug.Print " ---- Case 5" > Call PutDAC(voltagePin, 1.0, voltage13counter) > End select > > Call Sleep (2.0) > Teller=Teller+1 > Loop > > End Sub > > '************************************************ > Sub Init() > 'Dette er en sak som setter variablene slik jeg vil ha dem > Teller = 0 > NonDimVolt=1 > > 'Bekrefter at funksjonen har vært kjørt... > Debug.Print "Init kjørt." > End Sub > > '************************************************ > Sub lysTask() > > Do > > If bLys then > Call PutPin(nLys,0) > Else > Call PutPin(nLys,1) > End if > > bLys = Not bLys > > Call Sleep((csng(NonDimVolt))*0.1) > Loop > > end sub > Best regards > Sebastian Probst Eide > > -----Original Message----- > From: Sebastian P. E. [mailto:] > Sent: 16. oktober 2003 20:06 > To: > Subject: RE: [BasicX] PutDAC - strange voltages :( > > Well... this is really weird... > I put the BX-24 chip on my solder less breadboard and made the red LED > blink every time the PutDAC command was called so I would know if the > chip really was turned on. The program was the same I used when testing > on the dev board shipped with the chip. The LED started blinking as it > was supposed to, but there was no output at pin 13 although there had > been one while the chip was on the dev board. I even tried connecting a > wire directly to the pin to make sure there was a connection. I didn't > even get the strange voltages I previously complained about; I just got > a blank 0. > > If any of you guys has any idea what I might be doing wrong, please let > me know. I'll prototype a bit more in the meantime. > > I went over all the different connections on the board multiple times to > ensure I hadn't done anything wrong. > When the voltage was tested against the positive connection spot on the > board it showed the input voltage of the board, and when connected to > the negative spot it just showed 0. > > Best regards > Sebastian Probst Eide > > -----Original Message----- > From: Sebastian P. E. [mailto:] > Sent: 16. oktober 2003 19:24 > To: > Subject: RE: [BasicX] PutDAC - strange voltages :( > > Hi again Chris and everybody else reading this post. > I built a low pass filter as you described below but I still get strange > voltages. > I used a 1K resistor and connected it to a cap. which was connected to > ground. I measured the voltage at the resistor capacitor junction as > you told me to. > I tried with two different nondimVolt values: 0.2 and 1.0, but they both > returned a voltage of 0.48V. :-( > > The capacitors I tried, the only ones I could get here in Norway today, > had the following values: 47u and 220u > > Any ideas what could be wrong? > > Best regards > Sebastian Probst Eide > -----Original Message----- > From: Chris [mailto:] > Sent: 14. oktober 2003 19:33 > To: > Subject: Re: [BasicX] PutDAC - strange voltages > > Did you use an RC filter on the Dac pin? > > Try this circuit: > > 1K > BX-Pin o-----/\/\/\/\/\---o----o DAC Out > | > | > ____ > ____ .1uF cap > | > | > ------ > --- > - Ground > > Hopefully if my tabs aren't cut off you will see the circuit. > You connect a 1K resistor to your BX i/o pin, the other > end of the resistor is connected to a .1uF cap to ground. > The smoothed analog voltage is present at the resistor > capacitor junction. > > Chris > > > ----- Original Message ----- > From: "Sebastian P. E." <> > To: <> > Sent: Saturday, October 18, 2003 10:11 AM > Subject: [BasicX] PutDAC - strange voltages > > Hi > > I just tried the PutDAC command for the first time. > > I set up 6 pins to deliver different voltages from 1 to 5V but didn't > > really get the results I had expected. > > The actual voltages are listed below: > > > > PIN Number, NondimVolt, Actual voltage Should have been > > 13 0.2 0.23V 1.0V > > 14 0.4 0.24V 2.0V > > 15 0.5 0.19V 2.5V > > 16 0.6 0.35V 3.0V > > 17 0.8 0.15V 4.0V > > 18 1.0 0.17V 5.0V > > > > This shouldn't be the case though according to the documentation which > > states that a nondimvoltage of 1.0 should give the pin an output of > 5V! > > I continuously refreshed the states of the 6 different pins just to > make > > sure the voltage stayed the same. > > > > Another weird thing is that my multimeter wouldn't measure the voltage > > if I didn't use the ground on the developer board. I tried with a > > different ground supplied by another power source as well, but it > didn't > > give me any results at all! Any reason why this shouldn't work? > > > > Best regards > > Sebastian Probst Eide > > > > > > > > > > > > > > > > > > > > ">http://docs.yahoo.com/info/terms/ > > > > > > > > > > <http://rd.yahoo.com/M%1812.4024216.5238180.1261774/D=egroupweb/S06 > 554205:HM/A54451/R=0/SIGtmlldst/*http:/www.netflix.com/Default?mqs > o`178323&partid@24216> click here > <http://us.adserver.yahoo.com/l?M%1812.4024216.5238180.1261774/D=egrou > pmail/S=:HM/A54451/rand72211947> > > ">http://docs.yahoo.com/info/terms/> Service. > > > <http://rd.yahoo.com/M$4522.3707890.4968055.1261774/D=egroupweb/S06 > 554205:HM/A95056/R=0/SIG4p07ne0/*http:/ashnin.com/clk/muryutaitake > nattogyo?YH707890&yhad95056> Click Here! > <http://us.adserver.yahoo.com/l?M$4522.3707890.4968055.1261774/D=egrou > pmail/S=:HM/A95056/rand5126111> > > ">http://docs.yahoo.com/info/terms/> Service. > > > <http://rd.yahoo.com/M$4522.3707890.4968055.1261774/D=egroupweb/S06 > 554205:HM/A95055/R=0/SIG4j83ehr/*http:/ashnin.com/clk/muryutaitake > nattogyo?YH707890&yhad95055> Click Here! > <http://us.adserver.yahoo.com/l?M$4522.3707890.4968055.1261774/D=egrou > pmail/S=:HM/A95055/randS9757973> > > ">http://docs.yahoo.com/info/terms/> Service. > <http://rd.yahoo.com/M$4522.3707890.4968055.1261774/D=egroupweb/S065542 05:HM/A95055/R=0/SIG4j83ehr/*http:/ashnin.com/clk/muryutaitakenattogyo ?YH707890&yhad95055> Click Here! <http://us.adserver.yahoo.com/l?M$4522.3707890.4968055.1261774/D=egroupmai l/S=:HM/A95055/rande3702444> ">http://docs.yahoo.com/info/terms/> Service. ">http://docs.yahoo.com/info/terms/ |
|
Reply by ●October 17, 20032003-10-17
Sebastian, Did you ever do as Neil suggested and check your Grounding? Bob -----Original Message----- From: Sebastian P. E. Any thing that could solve the problem and give me the correct voltages at up to 5V would be great! -----Original Message----- From: Neil Jepsen Make sure the ground on BOTH boards are joined together. |
|
Reply by ●October 18, 20032003-10-18
Hi I just tried the PutDAC command for the first time. I set up 6 pins to deliver different voltages from 1 to 5V but didn't really get the results I had expected. The actual voltages are listed below: PIN Number, NondimVolt, Actual voltage Should have been 13 0.2 0.23V 1.0V 14 0.4 0.24V 2.0V 15 0.5 0.19V 2.5V 16 0.6 0.35V 3.0V 17 0.8 0.15V 4.0V 18 1.0 0.17V 5.0V This shouldn't be the case though according to the documentation which states that a nondimvoltage of 1.0 should give the pin an output of 5V! I continuously refreshed the states of the 6 different pins just to make sure the voltage stayed the same. Another weird thing is that my multimeter wouldn't measure the voltage if I didn't use the ground on the developer board. I tried with a different ground supplied by another power source as well, but it didn't give me any results at all! Any reason why this shouldn't work? Best regards Sebastian Probst Eide |
|