>-----Original Message----- >From: Mark Beetge [ MTN - Harrington Street ] > >Hi Mike >Thanks for the reply >The board I made has the pic interfaced to a FTDI USB chip and >I have routines to send to and receive from the board and a >VB6 program on my pc to send commands and receive info and do >the GUI. Both chips have a 0.1uF and 10uF tant decoupling. The >whole board uses smd components with the caps within mm of the >chips. The simple routine I use for doing the conversion is as follows: > >do_b > bsf ADCON0,GO,0 ; Start A/D >conversion >adconvtst btfsc ADCON0,DONE,0 ;Is conversion complete > goto adconvtst ;No, go test >again > > movf ADRESH,w,0 ;get high byte > call sendbyte ;send >it to USB > movf ADRESL,w,0 ;get low byte > call sendbyte ;send it to USB > > goto again ;back to read >USB for command loop > That part looks fine. I'm guessing you have a suitable acquisition delay (around 15us) between setting the channel in ADCON0 and setting the GO bit? One thing to check is that both sets of Vdd/Vss pins are definitely connected to their respective supplies, this is just the sort of odd behaviour that can occur if only one set of pins is powered. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body