<?xml version="1.0" encoding="utf-8" ?>
				<!-- generator="e107" -->
				<!-- content type="Forum / topic" -->
				<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
				<channel rdf:about="http://www.8051projects.net/">
				<title>8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes : Forum / topic</title>
				<link>http://www.8051projects.net/</link>
				<description>Learn to make simple microcontroller projects, pic, 8051, avr and arm projects. download 8051 projects, tutorials, libraries, sample codes. join the microcontroller discussion forum and ask doubts regarding electronics. the best source for 8051 over internet.</description>
				<dc:language>en-gb</dc:language>
				<dc:date>2009-01-07T22:35:09-08:00</dc:date>
				<dc:creator>contact@nospam.com</dc:creator>
				<admin:generatorAgent rdf:resource="http://e107.org" />
				<admin:errorReportsTo rdf:resource="mailto:contact@nospam.com" />
				<sy:updatePeriod>hourly</sy:updatePeriod>
				<sy:updateFrequency>1</sy:updateFrequency>
				<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
				<items>
				<rdf:Seq>
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t5905.html" />
				</rdf:Seq>
				</items>
				</channel>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator></dc:creator>
						<dc:subject></dc:subject>
						<description>hi i'm a newbie in this one. can anyone help me with this? i'm using miKroC  for programming the microcontroller. now i want to display the readings of the micocontroller in visual basic. for example i have a voltage output 4v read by the ucontroller and want to display the digital output in visual basic... thank you very much for sparing your time...</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>help needed urgently... why the code for my microcontroller wont detect a voltage? the leds don't turn on when i put 3vs as an analog input. everyone help me? and then the vb code for displaying the reading...</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>sashijoseph</dc:creator>
						<dc:subject></dc:subject>
						<description>@NormsCan you explain your project in some detail(mainly the algo)....As for the C program some things look suspect..... CODE:norms = &#40;&#40; 2.5 *1023&#41;/5&#41;; Now why would you do that?Why not simply 'norms=511',which is the value you get from that computation.And what is 'volts_out'?Are you reading in some value from the serial port?  CODE:else if&#40;volts_out==get_adc&#41; You haven't initialised get_adc,so you're in effect comparing volts_out to garbage.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>send the value to PC using UART and then display it in VB software after reading from COM port. All you need to do is COM port programming in Visual Basic (search forum for more information)</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>this is my c program for microcontroller... any help or suggestion? it doestn have an error thoughCODE:unsigned int volts_out;<br />unsigned int get_adc;<br />unsigned int x;<br />unsigned int norms;<br />unsigned int value;<br />unsigned int temp1;<br />unsigned int temp2;<br /><br />void main&#40;&#41;<br />&#123;<br />&nbsp;int exit = 1;<br />&nbsp;Usart_Init&#40;9600&#41;;<br />&nbsp;ADCON0 = 0x80;<br />&nbsp;ADCON1 = 0x80;<br />&nbsp;ADCON0.ADON = 1; // Enables A/D Conversion<br />&nbsp;TRISB = 0;<br />&nbsp;PORTB = 0;<br />&nbsp;RCSTA = 0x90;<br />&nbsp;TXSTA = 0x24;<br />&nbsp;Delay_ms&#40;100&#41;;<br />&nbsp;<br />&nbsp;for&#40;;;&#41;<br />&nbsp; &#123;<br />&nbsp; &nbsp; if&#40;Usart_Data_Ready&#40;&#41;&#41;<br />&nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; exit=1;<br />&nbsp; &nbsp; &nbsp; PORTB=0;<br />&nbsp; &nbsp; &nbsp; volts_out=Usart_Read&#40;&#41;;<br />&nbsp; &nbsp; &nbsp; Delay_ms&#40;100&#41;;<br />&nbsp; &nbsp; &nbsp; norms = &#40;&#40; 2.5 *1023&#41;/5&#41;;<br />&nbsp; &nbsp; &nbsp; if&#40;volts_out==norms&#41; &nbsp;// Within the 240-220 voltage range<br />&nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp;x = volts_out * &#40;5/1023&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; do<br />&nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F2=1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F3=1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F4=1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F5=1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delay_ms&#40;100&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;Usart_Data_Ready&#40;&#41;&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#125; while&#40;exit&#41;;<br />&nbsp; &nbsp; &nbsp; &#125;<br />&nbsp; &nbsp; &nbsp; else if&#40;volts_out>norms&#41; // Greater than 240 Volts<br />&nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; x = volts_out * &#40;5/1023&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; do<br />&nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F2=1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F3=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F4=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F5=1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delay_ms&#40;100&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;Usart_Data_Ready&#40;&#41;&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#125; while&#40;exit&#41;;<br />&nbsp; &nbsp; &nbsp; &#125;<br />&nbsp; &nbsp; &nbsp; else if&#40;volts_out&lt;norms&#41;<br />&nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; x = volts_out * &#40;5/1023&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; do<br />&nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F2=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F3=1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F4=1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F5=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delay_ms&#40;100&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;Usart_Data_Ready&#40;&#41;&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#125;<br />&nbsp; &nbsp; &nbsp; &nbsp; while&#40;exit&#41;;<br />&nbsp; &nbsp; &nbsp; &#125;<br />&nbsp; &nbsp; &nbsp; else if&#40;volts_out==get_adc&#41;<br />&nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; do<br />&nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ADRESH=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ADRESL=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F1=1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ADCON0.GO=1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delay_ms&#40;100&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value=Adc_Read&#40;0&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delay_ms&#40;100&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; temp1=ADRESH;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; temp2=ADRESL;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delay_ms&#40;100&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORTB.F1=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delay_ms&#40;100&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Eeprom_Write&#40;0,temp1&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delay_ms&#40;20&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Eeprom_Write&#40;1,temp2&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delay_ms&#40;20&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delay_ms&#40;50&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Usart_Write&#40;Eeprom_Read&#40;0&#41;&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delay_ms&#40;20&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Usart_Write&#40;Eeprom_Read&#40;1&#41;&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delay_ms&#40;50&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;Usart_Data_Ready&#40;&#41;&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#125; while&#40;exit&#41;;<br />&nbsp; &nbsp; &nbsp; &#125;<br />&nbsp; &nbsp; &#125;<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; PORTB=0xff;<br />&nbsp; &nbsp; &#125;<br />&nbsp; &#125;<br />&nbsp;<br />&#125;<br />&nbsp;</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>how i am going to display the read value in visual basic in digital form?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>how actually you are displaying your ADC output and where?also what do you mean by digital form? can you explain with example?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>the x = .... is the one i will be calling in the visual basic... i mean decimal value, sorry...</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>abbas1707</dc:creator>
						<dc:subject></dc:subject>
						<description>consider you have value=56 in microcontroller...now convert decimal to a string. and send seriially to vb.it that wat you want</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>GioppY</dc:creator>
						<dc:subject></dc:subject>
						<description>Do you mean something like this:</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>abbas1707 wrote ...consider you have value=56 in microcontroller...now convert decimal to a string. and send seriially to vb.it that wat you want   yup...this is how i am going to convert2.5v is the output read from a certain load then i'll convert it to decimal like this:norms = (( 2.5 *1023)/5);then ill have this declaration:if (volts_out==norms)//ill convert the decimal to a voltage value x = (volts_out * (5))/1023 // this is the voltage that ill be calling to the visual basic program, am i right?in vbthe value of x will be multiply to the ratio of the transformer like thisy = (x*220)/5 so y is the final value that i will like to be display in vb...so is it ok?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>yup but the voltage vill be converted to 220v from 8.7 for example. so insted of 8.7v in display it will now display 220V</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>GioppY wrote ...Hi.I have attached the vb6 source code and the exe.It communicate by one of the available com port on your pc @ 2400 baud,n,8,1It wait for a string in the following format xx,xCR  (CR means carriage return) where xx,x is a numeric value in the 00,0 to 19,9 range (please note the comma).When receive the string it display the value (the string as received) and plot a graphic representation; after 128 samples the plot is erased and restarted.It wait for a string every second; i do not know if it can handle higher sample rate. Obviously you have to modify the code for your requirement.RegardsGianniP.S.220v ??? I hope that you use a transformer to REDUCE and ISOLATE the mains from the pic and from the pc batt_mon.zipGioppy can you check my c program for microcontroller if its correct? thanks</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>GioppY wrote ...Do you mean something like this:can you teach mo how? like to ask for your code on that... please</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>GioppY</dc:creator>
						<dc:subject></dc:subject>
						<description>Hi.I have attached the vb6 source code and the exe.It communicate by one of the available com port on your pc @ 2400 baud,n,8,1It wait for a string in the following format xx,xCR  (CR means carriage return) where xx,x is a numeric value in the 00,0 to 19,9 range (please note the comma).When receive the string it display the value (the string as received) and plot a graphic representation; after 128 samples the plot is erased and restarted.It wait for a string every second; i do not know if it can handle higher sample rate. Obviously you have to modify the code for your requirement.RegardsGianniP.S.220v ??? I hope that you use a transformer to REDUCE and ISOLATE the mains from the pic and from the pc batt_mon.zip</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>thanks... yup i am using a transformer to step down the voltage then have some declarations equating 220=2.5 volts... thank you very much...</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>GioppY</dc:creator>
						<dc:subject></dc:subject>
						<description>Sorry! I do not know C language. I use picbasic.Regards</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>volts_out is the value read from the output of the load...  its not from the serial port... hehehe, i just want to show the computation so any man know how i get the 511 value... so is the program ok?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>sashijoseph</dc:creator>
						<dc:subject></dc:subject>
						<description>Except for get_adc value rest seems ok.btw what is the get_adc for?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>its for getting the reading from the load... like the decimal value and as well as the digital value...</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>heres my vb code: please and kindly check it. thanksCODE:Private Sub CmdExit_Click&#40;&#41;<br />&nbsp; &nbsp; If MSComm1.PortOpen = True Then<br />&nbsp; &nbsp; MSComm1.PortOpen = False<br />&nbsp; &nbsp; End If<br />&nbsp; &nbsp; &nbsp; &nbsp; End<br />End Sub<br />Private Sub Form_Load&#40;&#41;<br />&nbsp; &nbsp; MSComm1.InputLen = 0<br />&nbsp; &nbsp; MSComm1.CommPort = 1<br />&nbsp; &nbsp; MSComm1.Settings = "2400,N,8,1"<br />End Sub<br />Private Sub Timer1_Timer&#40;&#41;<br />&nbsp; &nbsp; Dim BytesToRead As Integer<br />&nbsp; &nbsp; Dim norms As Variant<br />&nbsp; &nbsp; MSComm1.PortOpen = True<br />&nbsp; &nbsp; BytesToRead = 1<br />&nbsp; &nbsp; Do<br />&nbsp; &nbsp; &nbsp; &nbsp; DoEvents<br />&nbsp; &nbsp; &nbsp; &nbsp; Loop Until MSComm1.InBufferCount = BytesToRead<br />&nbsp; &nbsp; &nbsp; &nbsp; norms = MSComm1.Input<br />&nbsp; &nbsp; &nbsp; &nbsp; Text1.Text = &#40;&#40;&#40;Asc&#40;norms&#41; * 0.01&#41; * 230&#41; / 2.5&#41; &amp; " Volts AC"<br />&nbsp; &nbsp; &nbsp; &nbsp; MSComm1.PortOpen = False<br />End Sub<br />&nbsp;</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>i need to see the circuit atleast..</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>sashijoseph</dc:creator>
						<dc:subject></dc:subject>
						<description>On close examination of your code,this is the logic I figured out.....for(;;){if(usart receive buffer is full)...read usart....volts_out=value read    {   if(volts_out=511)....light up some leds and loop till receive buffer is full again            elseif(volts_out&lt;511)....light up some leds and loop till receive buffer is full again      elseif(volts_out>511)....light up some leds and loop till receive buffer is full again      elseif(volts_out=get_adc)...read adc value,store it in EEPROM,read the stored                                                   EEPROM value and send it to USART     }else...PORTB=0xFF}Instead of the ADC you are reading in the value "Volts_out" from the USART....why?Moreover you need to send in some value from the PC to the USART in order for the 1st ' if' statement to trigger.(if(usart receive buffer is full))And then the variable get_adc...you are comparing volts_out to it before providing it with an initial value(you've only declared it "unsigned int get_adc;",not initialised it).Look at the code below...this is how it should be.unsigned int adc_val;unsigned char volts_out;void main() {  USART_Init(9600);   ADCON1 = 0x80;          TRISA  = 0xFF;     // PORTA is input  TRISB  = 0;        // PORTB is output        PORTB  = 0; while (1)  {    adc_val = ADC_Read(2);    volts_out = adc_val * 5/1023;    USART_Write(volts_out);    if(adc_val==511)      {PORTB = 0xFF;}    else if(adc_val&lt;511)      {PORTB = 0x0F;}    else      {PORTB = 0xF0;}    Delay_ms(5000);  }      }</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>my vb code... please check and correct it... thank you very much guys...Private Sub CmdExit_Click()    If MSComm1.PortOpen = True Then    MSComm1.PortOpen = False    End If        EndEnd SubPrivate Sub Form_Load()    MSComm1.InputLen = 0    MSComm1.CommPort = 1    MSComm1.Settings = "2400,N,8,1" End SubPrivate Sub Timer1_Timer()    Dim BytesToRead As Integer    Dim adc As Variant    MSComm1.PortOpen = True    BytesToRead = 1    Do        DoEvents        Loop Until MSComm1.InBufferCount = BytesToRead        adc = MSComm1.Input        Text1.Text = (((Asc(adc) * 0.01) * 230) / 2.5) &amp; " Volts AC"         MSComm1.PortOpen = FalseEnd Sub</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>at this moment my current code for my microcontroller 16F877, please correct it and write the code if you don't mind... please... really reallly need it. void main(){ int limit = 512; int vout; int adc; int x; int value; int temp1; int temp2; int exit = 1; Usart_Init(2400); ADCON0 = 0x80; ADCON1 = 0x80; ADCON0.ADON = 1; // Enables A/D Conversion TRISB = 0; PORTB = 0; RCSTA = 0x90; TXSTA = 0x24; Delay_ms(100); for(;;)  {    if(Usart_Data_Ready())      {      exit=1;      PORTB=0;      vout=Usart_Read();      Delay_ms(100);      if(vout == 512)  // Within the 240 Voltage Range, equal to 2.5 volts      {       do       {          PORTB.F1 = 1;          PORTB.F2 = 1;          PORTB.F3 = 1;          PORTB.F4 = 1;          PORTB.F5 = 1;          PORTB.F6 = 1;          PORTB.F7 = 1;          Delay_ms(1000);          if(Usart_Data_Ready())          {            exit=0;          }        }        while(exit);      }      else if(vout > 512) // Greater than 240 Volts, greater than 2.5 volts      {        do        {            PORTB.F1 = 1;            PORTB.F3 = 1;            PORTB.F5 = 1;            PORTB.F7 = 1;            Delay_ms(1000);            if(Usart_Data_Ready())          {            exit=0;          }        }        while(exit);      }      else if (vout &lt; 512) // Less than 240 volts, less than 2.5 volts      {       do       {           PORTB.F2 = 0;           PORTB.F4 = 0;           PORTB.F6 = 0;           Delay_ms(1000);           if (Usart_Data_Ready())           {            exit = 0;           }       }       while(exit);      }      else if (vout == 0)      {       do       {        PORTB.F1=0;        PORTB.F2=0;        PORTB.F3=0;        PORTB.F4=0;        PORTB.F5=0;        PORTB.F6=0;        PORTB.F7=0;        if(Usart_Data_Ready())        {         exit=0;        }       }       while(exit);      }      else if(vout == adc)        {        do        {          ADRESH=0;          ADRESL=0;          ADCON0.GO=1;          Delay_ms(100);          value=Adc_Read(0);          Delay_ms(100);          exit=0;          temp1=ADRESH;          temp2=ADRESL;          Delay_ms(1000);          Eeprom_Write(0,temp1);          Delay_ms(20);          Eeprom_Write(1,temp2);          Delay_ms(70);          Usart_Write(Eeprom_Read(0));          Delay_ms(20);          Usart_Write(Eeprom_Read(1));          Delay_ms(50);          if(Usart_Data_Ready())          {            exit=0;          }        }        while(exit);      }    }    else    {      PORTB=0xff;    }  }}</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>this is my circuit</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>the Tx and Rx were put incorrectly... Rx should in the Tx place...</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>sashijoseph wrote ...Like I pointed out ealier your PIC code won't work.For eg. CODE:if&#40;Usart_Data_Ready&#40;&#41;&#41; why are you checking the (PIC's) serial port input buffer?Are you sending sth into the PIC's serial port?If not then why use this check?Then you have    CODE:vout=Usart_Read&#40;&#41;; You should be getting the value from the ADC rather than the serial port.Similarly there are plenty of flaws.......Look at the code below.This is all you need to read in ADC value and send it as two bytes to the PC's serial port.unsigned int adc_val;unsigned char low_byte,hi_byte;void main() {  USART_Init(9600);   ADCON1 = 0;          TRISA  = 0xFF;     // PORTA is input  TRISB  = 0;        // PORTB is output        PORTB  = 0; while (1)  {    adc_val = ADC_Read(2);   //get ADC value    low_byte = adc_val;      //split the 2-byte integer into 2 separate bytes    hi_byte = adc_val >> 8;  //for sending to pc serial port    USART_Write(low_byte);   //send the 1st (lower) byte    USART_Write(hi_byte);    //send the upper byte    if(adc_val==511)         //if ADC value read in is 511       {PORTB = 0xFF;}        //display some LED's on PORTB    else if(adc_val&lt;511)      {PORTB = 0x0F;}    else      {PORTB = 0xF0;}    Delay_ms(5000);          //gather a sample after 5 secs.  }    }what happened to the USART_Write(volts_out)? in your first correction you have it, then now its gone, replace by the low and high byte... please enlightened me with this...then in my vb pro, do i need to change the BytesToRead = 1 to 2? and then the "adc=MSComm1.Input"what will be my input here?  thanks</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>heres my code and its working, i can light the leds now..... hope you can add the necessary codes for transmitting the signal to the serial port... pls help...void main(){  int limit=512;  int value;  TRISA=0xff; // Configure PORTA as analog input  TRISB=0; // Configure PORTB as output  PORTA=0;  PORTB=0;  ADCON0=0b10000000;  ADCON1=0b10001110;  ADCON0.ADON=1; // Enable ADC  for(;;)  {    ADCON0.GO=1;    Delay_us(10);    value=Adc_Read(0);    if(value>=512) // value is greater or equal to 2.5V    {      PORTB.F0=1;      PORTB.F2=1;      PORTB.F4=1;      PORTB.F6=1;      Delay_ms(100);      PORTB.F0=0;      PORTB.F2=0;      PORTB.F4=0;      PORTB.F6=0;      Delay_ms(100);    }    else if(value&lt;512)    {      PORTB.F1=1;      PORTB.F3=1;      PORTB.F5=1;      PORTB.F7=1;      Delay_ms(100);      PORTB.F1=0;      PORTB.F3=0;      PORTB.F5=0;      PORTB.F7=0;      Delay_ms(100);    }    Delay_ms(3000);  }}and pls help me in my vb program... here is my first vb program...Private Sub CmdExit_Click()    If MSComm1.PortOpen = True Then    MSComm1.PortOpen = False    End If        EndEnd SubPrivate Sub Form_Load()    MSComm1.InputLen = 0    MSComm1.CommPort = 1    MSComm1.Settings = "9600,N,8,1" End SubPrivate Sub Timer1_Timer()    Dim BytesToRead As Integer    Dim value As Variant    MSComm1.PortOpen = True    BytesToRead = 1    Do        DoEvents        Loop Until MSComm1.InBufferCount = BytesToRead        value = MSComm1.Input        Text1.Text = (((Asc(value) * 0.01) * 230) / 2.5) &amp; " Volts AC"         MSComm1.PortOpen = FalseEnd Sub</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>thanks sashijoseph for the help. appreciate it very much... ill test it tonight ill keep in touchwith you. you save my life...</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>sashijoseph</dc:creator>
						<dc:subject></dc:subject>
						<description>Like I pointed out ealier your PIC code won't work.For eg. CODE:if&#40;Usart_Data_Ready&#40;&#41;&#41; why are you checking the (PIC's) serial port input buffer?Are you sending sth into the PIC's serial port?If not then why use this check?Then you have    CODE:vout=Usart_Read&#40;&#41;; You should be getting the value from the ADC rather than the serial port.Similarly there are plenty of flaws.......Look at the code below.This is all you need to read in ADC value and send it as two bytes to the PC's serial port.unsigned int adc_val;unsigned char low_byte,hi_byte;void main() {  USART_Init(9600);   ADCON1 = 0;          TRISA  = 0xFF;     // PORTA is input  TRISB  = 0;        // PORTB is output        PORTB  = 0; while (1)  {    adc_val = ADC_Read(2);   //get ADC value    low_byte = adc_val;      //split the 2-byte integer into 2 separate bytes    hi_byte = adc_val >> 8;  //for sending to pc serial port    USART_Write(low_byte);   //send the 1st (lower) byte    USART_Write(hi_byte);    //send the upper byte    if(adc_val==511)         //if ADC value read in is 511       {PORTB = 0xFF;}        //display some LED's on PORTB    else if(adc_val&lt;511)      {PORTB = 0x0F;}    else      {PORTB = 0xF0;}    Delay_ms(5000);          //gather a sample after 5 secs.  }    }</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>sashijoseph</dc:creator>
						<dc:subject></dc:subject>
						<description>The previous USART_Write(volts_out) would send out the value  volts_out which had been declared as char hence only rounded off values(ie1,2,3,4,5) would be sent instead of say 1.87 or 2.54 etc.It was only for checking proper working.The actual value received by the adc,which is an integer (2bytes) is split into two bytes and sent to the PC as Low_byte and Hi_byte.In the PC you can then 'join' the 2 bytes to the original int and then convert it to the appropriate voltage reading to be displayed. Hope it's clear.I would suggest doing things step by step.First program the PIC and see if the LED's are working correctly.Then use Hyperterminal and check if the serial code is OK.Finally make the VB program.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>thanks.. ill try it tonight...</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t5905.html">
						<title>Re: how to dispaly the a/d value from PIC16F877 using visual basic in digital value</title>
						<link>http://www.8051projects.net/forum-t5905.html</link>
						<dc:date>2009-01-07T22:35:09-08:00</dc:date>
						<dc:creator>norms</dc:creator>
						<dc:subject></dc:subject>
						<description>hmm im trying it right now, and it can't light the leds on... does something in my circuit is wrong? the schematic diagram of my pic was posted before here. kindly check it sashjoseph, ive changed the ADCON1 to ADCON0, so the input will be put in AN0 in pin number 2, am i right?</description>
						</item>
				</rdf:RDF>