![]() |
|
Portal | PhotoPost Gallery | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
Thread Tools | Display Modes |
#27
|
|||||
|
|||||
![]() Hello,
Is it easy for you to build a cheap simple low speed ADC interface for the serial port? Matlab has serial access functions and the following code sample serve to illustrate how we can use our computers with a simple interface to do continuous data sampling. Assuming that we want to take a sample every 60 seconds with a timing resolution of 'res': % Code Snippet res = 0.5; previous_time = 0; current_time = clock; if [etime[current_time, previous_time) < 60) pause[res); current_time = clock; else previous_time = current_time; % Trigger and sample ADC current_time = clock; end % Code Snippet |
Thread Tools | |
Display Modes | |
|
|