![]() | ![]() | ![]() |
| | |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hi Eric, That's a good idea about the graphical monitoring I'll try it and see if I can get a better handle on things. I wrote a program in the past to generate a frequency through the parallel port using the QueryPerformance functions for timing in order to test another circuit I had built. For this I set the program to real-time mode in the task manager to disable any Windows interrupts and get a stable output. I tried to find some practical information about the use of the ADC on the internet and came across this page: http://www.emesys.com/OL2tlc2543.htm. They use the Basic Stamp microcontroller to control the TLC2543. Towards the bottom of the page they give a bit of information about things to be aware of in order to ensure stable operation, some of which is a tad beyond my understanding. I'd be grateful if you could have a quick look and see if there is anything there that might important enough that I should be considering in my own circuit. Thanks, Salvatore. | |
| |
| | (permalink) |
| hi, Towards the bottom of the page they give a bit of information about things to be aware of in order to ensure stable operation, some of which is a tad beyond my understanding. I'd be grateful if you could have a quick look and see if there is anything there that might important enough that I should be considering in my own circuit. This refers to source impedance of the Analog inputs, all it means is that if the source impedance/resistance is too high, the internal 60pF capacitor inside the ADC ic will not be able to charge/discharge fast enough via this source resistance, before the ADC conversion cycle starts. This would mean an error in the ADC value, they are suggesting hanging a large cap [0.33uF] on the ADC input, this cap would transfer some of its charge to the 60pF, which would make the error due to a high resistance source smaller. Its best to stay within the datasheet spec for the source impedance for optimum accuarcy. Lets know how you get on, others may benefit from your work. Regards
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | |
| |
| | (permalink) |
| I'll certainly keep you informed if I make any discoveries. Thanks for your input! Salvatore. | |
| |
| | (permalink) | |
| Quote:
Attached zip file, basics of a graphical display for the ADC port. I have tested it using a 4013 dual bistable as the ADC ic and it works OK. The MakeAry subr has also been modified. Regards Last edited by ericgibbs; 7th July 2008 at 12:20 PM. | ||
| |
| | (permalink) |
| hi salvatore. Upgraded zip, you should find this version easier to modify for your trials. The sample graphs are produced by the 'clock' driving a 4013, connected as a divider. Regards Last edited by ericgibbs; 7th July 2008 at 12:20 PM. | |
| |
| | (permalink) |
| Hi Eric, Thanks for sticking with it, much appreciated! Thanks, Salvatore. | |
| |
| | (permalink) |
| hi salvatore, Looking at your drawing, you have not shown a 0V gnd connection from the parallel port Pin18 thru 25, to the external power 0V gnd line??? Is this a dwg error? | |
| |
| | (permalink) |
| Hi Eric, Yes, that is an error or rather an omission, I have pin 25 as the ground. I've done some further analysis. I've used the DAC to supply a range of input voltages to the ADC from 0V to 5V in steps of 20mV. For each voltage input I took 100 sample readings and averaged them. I plotted these average readings on a graph, with input voltages along the x-axis and averaged ADC readings along the y-axis ( see attached graph ). The results are very consistent from run to run. I've changed the grounding but the result are the same. Salvatore. | |
| |
| | (permalink) |
| Hi Salvatore, Have looked thru your results graph. Is it possible that you could post a copy of your latest program? On your original program in the first address sequence, where you had the copy/paste error, are you still switching Dta2 CS line, on the D9 clock cycle?? If so, you are resetting the ADC's internal counters and all your sampling will be out of sequence. This could account for the 'repeatable error' in the results. Regards Eric | |
| |
| | (permalink) |
| Hi Eric, I've attached some files that contitute the source code and the installation package. I had to do a major tidy up on the code as it was starting to get messy with all the quick and dirty test code that was added..! Thanks, Salvatore. | |
| |
| | (permalink) |
| hi, Downloaded the zips, unpacked OK. Program runs as *.exe and in VB design time OK. Using the 4013 test jig, the ADC results are correct??? I will do more work on the program tomorrow. Regards | |
| |
| | (permalink) |
| Hi Eric, Guess what? I found out what the problem was... the DB25 printer cable I was using..! Doh! In order to test if the software worked on another machine, I downloaded the software to a laptop, connected the printer cable as normal and I got exactly the same rubbish results. But because I could get the laptop very close to the circuit I decided to remove the cable and plugged the circuit's DB25 male connecter straight onto the laptops parallel port, and hey presto, a straight line graph..! Thanks, Salvatore. | |
| |
| | (permalink) |
| 32/4096 is 0.0078 which is 0.78%. | |
| |
| | (permalink) |
| Oooops.. ! | |
| |
| | (permalink) |
| Hi Salvatore, Pleased to hear you are making good progress. I have found that the 'makeup' of parallel cables can vary quiet a lot. Some have a data wire twisted with a dedicated 0V wire, others rely on a overall outer screening, some dont have all the 0V's, pins 18 thru 25 connected. Also the length of the para cable should be as short as possibe, the pulse edges become degraded, some homemade para programmers can suffer from this problem. It is possible to fit non-inverting buffers on the data lines if its necessary to have a longer cable. Regards Eric | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Parallel port control port: is it Write Only or Read/Write | elexhobby | Electronic Projects Design/Ideas/Reviews | 6 | 23rd December 2008 11:18 AM |
| Need help badly on Inchworm and MPLAB | thushy | Micro Controllers | 14 | 11th March 2007 07:05 PM |
| I need: Parallel Port.. examples and applications.. | sonaiko | General Electronics Chat | 8 | 28th October 2006 02:44 PM |
| PIC 2 PC: Parallel (Port) Read | Electrix | Micro Controllers | 8 | 31st July 2005 05:24 PM |
| Multiple devices controlled at once on one parallel port | Kerri Ann | Electronic Projects Design/Ideas/Reviews | 0 | 18th February 2005 11:52 AM |