Another electrochemical mode was implemented using the DAP Linear Sweeping – Mode, also known as Anodic Stripping Voltammetry. Anodic Stripping Voltammetry (ASV) an effective is electrochemical method for quantitative determination of ions in solution. As indicated in chapter I, this method has advantage over other techniques for its simplicity and sensitivity. This method requires a programmable voltage and a data acquisition module, which are available in the DAP. The analyte of interest was accumulated onto the electrode surface during the deposition step, and then oxidized in stripping step. Current peaks measured during the stripping step indicate the existence of analytes. The scanning voltage can have different forms, including linear, staircase, square wave, etc.
This technique includes three main steps:
- Accumulation/Deposition Step: Metal ions in the solution will be deposited on the electrode surface, reduced to the metal atoms.
- Stripping Step: At this stage, metal on the electrode surface will be oxidized into ions. Electrons exchanged with electrode surface will raise the current.
- Cleaning Step: The voltage will keep up at a high value to make sure that all the metal atoms are oxidized back to ions and go back to solution.
In this thesis, anodic stripping voltammetry method was used to detect arsenic ions (As3+). Linear voltage was used for sweeping. As3+ is prepared in 1ppm (parts-per- million) stock and then diluted to different concentrations at 10ppb, 30ppb, 50ppb, 70ppb and 100ppb (parts-per-billion), for the WHO standard of As3+ in water is 10ppb. The concentrations of each solution were verified by Atomic Absorption Spectroscopy (AAS) method. The instrument which conducted the spectroscopy was AAS Agilent 200 Series AA at Vietnam National University. The measurement utilized the three electrode system above. At first, the electrode was cleaned in K2CrO7 to wipe off all the
62
contamination on the surface, then it was activated in HCl 2M in 2 minutes. After that, the electrode went through three steps in the process.
The measurement was performed on both EC301 Potentiostat device and the DAP .The measurement conditions have been optimized in this situation to reach the most stable signal and highest peak value. As3+ was mixed with HCl acid to reach the pH of 2.5. pH solution was verified with Metrohm pH Meter 691.
The applied voltage form for the measurement was shown in Figure 3.13:
Figure 3. - Voltage form for ASV measurement for Arsenic Detection 13
The voltage was fixed at -0.45V for 110s, then in stripping step the voltage increased to 0.6V at scan rate 1V/s. Finally, in cleaning step, the voltage value is kept fixed at 0.6V for 60s more.
63 Figure 3. - ASV Measurement at As3+ 14
50ppb with the DAP
Figure 3. - ASV Measurement at As3+ 15 50ppb with EC301
The measurement with As3+ at concentration 50 ppb was performed with two similar electrodes on two devices. The results were shown on Figure 3.14 and 3.15.
The voltammogram on Figure 3.14 is measured by the DAP and the one on Figure 3.15 is measured by EC301. The current peak appears at the stripping steps, where the voltage raised from -0.45 to +0.6V. The voltammogram is based on time and current axes. The difference of the moment where the peak occurs shows the scan rates and timing of the two devices are slightly different. It indicates the inaccuracy of the firmware as well as the timing algorithm in the DAP.
64 Figure 3. - ASV Voltammogram for 16 different As3+concentrations by the DAP
Figure 3. - ASV Voltammogram for 17 different As3+ concentrations by EC301 A series of As3+ concentration were measured using the same method. The results were shown on Figure 3.16 and 3.17. The number of electrons exchanged at the working electrode surface site contributes to the peak current value. As the concentration of As3+
increases, the number of metal ions accumulated on the working electrode surface also increase. The number of electrons exchanged with the electrode is related to the amount of heavy metal atoms deposited on the electrode surface. This explains why the corresponding peak current increases as the As3+ions concentration increases.
The regression lines of the two devices are shown below:
65
Figure 3. - Regression lines for both devices 18
As we can see in Figure 3.18, the correlation coefficients for the DAP and EC301 measurements are 0.9714 and 0.995 respectively. It shows that the modelling line fits the real data, but that of EC301 is better than that of the DAP. The intercept and standard error of the two regression line are close but the slope of regression line of EC301 is much greater, which indicates the sensitivity of EC301 is higher than that of the DAP.
From the regression lines in the two applications above, two problems can be seen, which are the lower sensitivity and noise level of the DAP. The most important contributor to the sensitivity of a potentiostat is I/E converter. The cell current is forced to flow through a sensing resistor. Therefore, the unwanted noise stems from the resistor could affect the voltage measured. Also, there is only one resistor value which strongly affects the sensitivity of the measurement. In commercial potentiostat, there is a range of current which corresponds to an array of resistors. The observed high noise level in the DAP
66
may be caused by the use of micro-controller reference voltage: the DAC itself is referenced to the system power which is prone to noise. The resolution of DAC is only 8-bit, and after go through a number of processing stages before entering the cell. The quality of components (Op-amps) could add thermal noise, voltage drift and dc offset voltage. Also, the sampling rate of ADC was not high (only 60 sps), which can cause aliasing in the acquired signal. Inside the electrochemical solution, there are some resistance components that we were not fully acknowledged, which led to a drop in acquired current. Some measures could be applied to the circuit to detect the unknown impedance in the solution, and feedback could be used to compensate for those unwanted drop. However, these iR drops only happens at high frequency, which mainly affects the EIS measurement.
Future Work
Some problems with the current device have been analyzed above, and the design could be augmented for better performance. Firstly, a number of resistors with diverse values could be added to improve the sensitivity of the device. As indicated above, the I/E converter modules contributes mainly to the sensitivity of the current measurement.
Secondly, the signal spectrum should be studied thoroughly for better understanding of impedance model in the solution as well as the signal processing part. The value of components used in the analog circuit can be adjusted for lower noise in signal processing stage. Better noise cancellation will result in higher signal- -noise ratio, to which leads to lower noise level and detection limit of device. For the main processor, the 8-bit micro-controller could be replaced with a 32-bit micro-controller with higher resolution in DAC and ADC, for example PSoC5 LP series from Cypress. Electro- Impedance Spectroscopy (EIS) could also be implemented using the circuit, for the working principle of EIS is the same as Potentiostat. The acquired data could also be sent through wireless communication for on-site measurement.
67 Conclusion
In this chapter, functions of the Data Acquisition and Processing Device (DAP) were verified. Each module was tested with electrometer, including power source, voltage generator, data acquisition and LabView Software. The voltage generator and data acquisition modules are programmable and their range as well as resolution could be adjusted to fit the desired applications. After that, the whole device was put into tests with resistor and redox solution ( ). The results shown that the device functions properly as literature and could be used in real applications. In this thesis, its application with DNA sensor and heavy metal sensor for food safety analysis were examined.
In application with DNA sensor, the DAP implemented cyclic voltammetry mode to detect the existence and concentrations of DNA target as low as . The responsive time for each measurement was under 1 minute. The DNA sensors were tested simultaneously on EC301 a commercial potentiostat with similar parameters. – – The results showed that the calibration lines of both devices have the same trend, however the sensitivity of regression line on EC301 was better.
In application with heavy metal detection for food safety analysis, the DAP implemented linear sweeping mode to perform anodic stripping voltammetry. The heavy metal sample was verified by AAS spectrometer. After that, the samples were tested on the DAP and EC301 at the same parameters. The results showed the ability of the DAP to detect the existence of as low as 10ppb in just two minutes. The calibration line showed a similar tendency with that performed on EC301 but with lower sensitivity, which is similar to the results seen in DNA sensor application.
Some suggestions were made for the improvement of the device, which could be applied in the future.
68
General Conclusion
In this thesis, the overview on conventional DNA sensor and heavy metal detection method for food safety analysis has been presented. Electrochemical methods for these sensor have been studied. A Data Acquisition and Processing Device for analytically electrochemical measurement was designed and implemented. The device was powered at 5V DC. The device was able to generate the desired voltage form and apply to the sensor, while obtaining the response data. The applying voltage range is from -1.3V to +1.3V and the minimum resolution is 5mV. The obtained voltage range is the same as applying voltage range, and the sampling rate is 60 samples per second at resolution 13 bit. The obtained current range is ±170àA. The device could communicate with computer via USB. The acquired data could be displayed on Labview-based software and stored in varied extensions. Block functions were verified and electrochemical modes were used in DNA sensor and heavy metal detection for food safety analysis. The lowest concentration of target DNA which could be detected was 10- 12and the lowest concentration of heavy metal ions (As3+) was 10ppb. The sensitivity and signal to noise ratio of the device was lower compared to that of a commercial potentiostat – EC301.
The results showed good potential of applying this circuit to on-site measurement and replace simple laboratory electrochemical analysis.
To improve the functionality of the circuit, some suggestions were made. The I/E converter may require a series of resistors to enhance the current sensitivity. Besides, the resolution of DAC and ADC modules could be upgraded. The components as well as signal processing stage could be improved to enhance signal to noise ratio and noise level of measured signal. EIS function is also taken into consideration for development using this circuit.
69
REFERENCES
[1] Bard, A. J., L. R. Faulkner (2001), "Electrochemical Instrumentation" in
“ELECTROCHEMICAL METHODS Fundamentals and Applications,” Elsevier, pp. 632 658. –
[2] Cagnin, S., M. Caraballo, C. Guiducci, P. Martini, M. Ross, M. SantaAna, D.
Danley, T. West, and G. Lanfranchi (2009), “Overview of Electrochemical DNA Biosensors: New Approaches to Detect the Expression of Life” Sensors, vol. 9, no. 4, pp. 3122 3148. –
[3] Chang, T. and Y. Lee (2007), “Applications of magnetic nanoparticles in engineering and biomedical science” 2007 7th IEEE Conf. Nanotechnol. (IEEE NANO), pp. 656 659. –
[4] Clack, N. G., K. Salaita, and J. T. Groves (2008), “Electrostatic readout of DNA microarrays with charged microspheres” Nat. Biotechnol., vol. 26, no. 7, pp. 825– 830.
[5] Dey, D. and T. Goswami (2011), “Optical biosensors: A revolution towards quantum nanoscale electronics device fabrication,” J. Biomed. Biotechnol., vol.
2011.
[6] Drummond, T. G., T. G. Drummond, M. G. Hill, M. G. Hill, J. K. Barton, and J.
K. Barton (2003), “Electrochemical DNA sensors” Nat. Biotechnol., vol. 21, no.
10, pp. 1192 1199. –
[7] Engstrom, R. C. and V. a. Strasser (1984) “Characterization of electrochemically pretreated glassy carbon electrodes” Anal. Chem., vol. 56, pp. 136 141. –
[8] Evtugyn, G. (2014), Biosensors: Essentials, vol. 84.
[9] Le Floch, F., H. A. Ho, P. Harding-Lepage, M. Bédard, R. Neagu-Plesu, and M.
Leclerc (2005), “Ferrocene-functionalized cationic polythiophene for the label- free electrochemical detection of DNA” Adv. Mater., vol. 17, no. 10, pp. 1251– 1254.
70
[10] Fourati, N., M. Lazerges, C. Vedrine, J.-M. Fougnion, C. Zerrouki, L. Rousseau, P. Lepeut, J. J. Bonnet, and C. Pernelle (2009), “Surface Acoustic Waves Sensor for DNA-Biosensor Development” Sens. Lett., vol. 7, no. 5, pp. 847 850. –
[11] Fusco, V. and G. M. Quero (2012), “Nucleic Acid-Based Methods to Identify , Detect and Type Pathogenic Bacteria Occurring in Milk and Dairy Products” in Structure and function of food engineering, pp. 371 404. –
[12] Gerard, M., A. Chaubey, and B. D. Malhotra (2002), “Application of conducting polymers to biosensors” Biosens. Bioelectron., vol. 17, no. 5, pp. 345 359. – [13] Gs, S., A. Cv, and B. B. Mathew (2014), “Biosensors : A Modern Day
Achievement” vol. 2, no. 1, pp. 26–39.
[14] Guiducci, C., C. Stagni, G. Zuccheri, A. Bogliolo, L. Benini, B. Samorì, and B.
Riccò (2002), “A Biosensor for Direct Detection of DNA Sequences Based on Capacitance Measurements” Ieee, pp. 3 6. –
[15] Jain, M. and M. J. Siddiqui (2014), “Biosensors in our Daily Life” vol. 5, no. 1, pp. 13 20. –
[16] Lacourse, W. and M. Olson (2004), “Voltammetry” in Analytical Instrumentation Handbook, Third Edition, CRC Press, pp. 529 530. –
[17] Lọnge, K., B. E. Rapp, and M. Rapp (2008), “Surface acoustic wave biosensors:
A review” Anal. Bioanal. Chem., vol. 391, no. 5, pp. 1509 1519. –
[18] Millan, K. M., a Saraullo, and S. R. Mikkelsen (1994), “Voltammetric DNA biosensor for cystic fibrosis based on a modified carbon paste electrode” Anal.
Chem., vol. 66, no. 18, pp. 2943 2948. –
[19] Millan, K. M. and S. R. Mikkelsen (1993), “Sequence-Selective Biosensor for” pp. 2317 2323. –
[20] Murugaiyan, S. B., R. Ramasamy, N. Gopal, and V. Kuzhandaivelu (2014),
“Biosensors in clinical chemistry: An overview” Adv. Biomed. Res., vol. 3, p. 67.
[21] Nakano, K., T. Kimura, Y. Kitamura, T. Ihara, R. Ishimatsu, and T. Imato (2014),
71
“Potentiometric DNA sensing platform using redox-active DNA probe pair for sandwich-type dual hybridization at indicator electrode surface” J. Electroanal.
Chem., vol. 720 721, pp. 71 75. – –
[22] Palecek, E. (1960), “Oscillographic Polarography of Highly Polymerized Deoxyribonucleic Acid” Nature, vol. 188, pp. 656 657. –
[23] Paleček, E. (2002), “Past, present and future of nucleic acids electrochemistry” Talanta, vol. 56, no. 5, pp. 809 819. –
[24] Parkash, M. and P. Skladal (2008), “Electrochemical Biosensors - Principles and Aplications” J. Appl. Biomed., no. January, pp. 57 64. –
[25] Rahman, M., X.-B. Li, N. Lopa, S. Ahn, and J.-J. Lee (2015), “Electrochemical DNA Hybridization Sensors Based on Conducting Polymers” Sensors, vol. 15, no.
2, pp. 3801 3829. –
[26] Ronconi, L., C. Marzano, P. Zanello, M. Corsini, G. Miolo, C. Macca, and A.
Trevisan (2006), “Gold ( III ) Dithiocarbamate Derivatives for the Treatment of Cancer : Solution Chemistry , DNA Binding , and Hemolytic Properties” no. Iii, pp. 1648 1657. –
[27] S.Wolfbeis, O. (2006), Springer Series on Chemical Sensors and Biosensors, vol.
4, no. 5.
[28] Sauerbrey, G. (1959), “Verwendung von Schwingquarzen zur Wọgung dỹnner Schichten und zur Mikrowọgung” Zeitschrift fỹr Phys., vol. 155, no. 2, pp. 206– 222.
[29] Scholz, F. and A. M. Bond (2010), Electroanalytical methods : guide to experiments and applications. Heidelberg; New York: Springer.
[30] Teles, F. R. R. and L. P. Fonseca (2008), “Trends in DNA biosensors” Talanta, vol. 77, no. 2, pp. 606 623. –
[31] Thinh, T. (2016), “Fabrication of immunosensor for detection of poultry virus” HUST,.
72
[32] Veigas, B., E. Fortunato, and P. Baptista (2015), “Field Effect Sensors for Nucleic Acid Detection: Recent Advances and Future Perspectives” Sensors, vol. 15, no.
5, pp. 10380 10398. –
[33] Venter, J. C., M. D. M. Adams, E. E. W. Myers, P. W. Li, R. J. Mural, G. G.
Sutton, H. O. Smith, M. Yandell, C. A. Evans, R. A. Holt, J. D. Gocayne, P.
Amanatides, R. M. Ballew, D. H. Huson, J. R. Wortman, Q. Zhang, C. D. Kodira, X. H. Zheng, L. Chen, M. Skupski, G. Subramanian, P. D. Thomas, J. Zhang, G.
L. G. Miklos, C. Nelson, S. Broder, A. G. Clark, J. Nadeau, V. A. Mckusick, N.
Zinder, A. J. Levine, R. J. Roberts, M. Simon, C. Slayman, M. Hunkapiller, R.
Bolanos, A. Delcher, I. Dew, D. Fasulo, M. Flanigan, L. Florea, A. Halpern, S.
Hannenhalli, S. Kravitz, S. Levy, C. Mobarry, K. Reinert, K. Remington, J. Abu- threideh, E. Beasley, K. Biddick, V. Bonazzi, R. Brandon, M. Cargill, I.
Chandramouliswaran, R. Charlab, K. Chaturvedi, Z. Deng, V. Di Francesco, P.
Dunn, K. Eilbeck, C. Evangelista, A. E. Gabrielian, W. Gan, W. Ge, F. Gong, Z.
Gu, P. Guan, T. J. Heiman, M. E. Higgins, R. Ji, Z. Ke, K. A. Ketchum, Z. Lai, Y.
Lei, Z. Li, J. Li, Y. Liang, X. Lin, F. Lu, G. V Merkulov, N. Milshina, H. M.
Moore, A. K. Naik, V. A. Narayan, B. Neelam, D. Nusskern, D. B. Rusch, S.
Salzberg, W. Shao, B. Shue, J. Sun, Z. Y. Wang, A. Wang, X. Wang, J. Wang, M.
Wei, R. Wides, C. Xiao, C. Yan, A. Yao, J. Ye, M. Zhan, W. Zhang, H. Zhang, Q.
Zhao, L. Zheng, F. Zhong, W. Zhong, S. C. Zhu, S. Zhao, D. Gilbert, S.
Baumhueter, G. Spier, C. Carter, A. Cravchik, T. Woodage, F. Ali, H. An, A. Awe, D. Baldwin, H. Baden, M. Barnstead, I. Barrow, K. Beeson, D. Busam, A. Carver, M. L. Cheng, L. Curry, S. Danaher, L. Davenport, R. Desilets, S. Dietz, K.
Dodson, L. Doup, S. Ferriera, N. Garg, A. Gluecksmann, B. Hart, J. Haynes, C.
Haynes, C. Heiner, S. Hladun, D. Hostin, J. Houck, T. Howland, C. Ibegwam, J.
Johnson, F. Kalush, L. Kline, S. Koduru, A. Love, F. Mann, D. May, S. Mccawley, T. Mcintosh, I. Mcmullen, M. Moy, L. Moy, B. Murphy, K. Nelson, C. Pfannkoch,
73
E. Pratts, V. Puri, H. Qureshi, M. Reardon, R. Rodriguez, Y. Rogers, D. Romblad, B. Ruhfel, R. Scott, C. Sitter, M. Smallwood, E. Stewart, R. Strong, E. Suh, R.
Thomas, N. N. Tint, S. Tse, C. Vech, G. Wang, J. Wetter, S. Williams, M.
Williams, S. Windsor, E. Winn-deen, K. Wolfe, J. Zaveri, K. Zaveri, J. F. Abril, R. Guigo, A. Kejariwal, H. Mi, B. Lazareva, T. Hatton, A. Narechania, K. Diemer, A. Muruganujan, N. Guo, S. Sato, V. Bafna, S. Istrail, R. Lippert, R. Schwartz, B.
Walenz, S. Yooseph, D. Allen, A. Basu, J. Baxendale, L. Blick, M. Caminha, J.
Carnes-stine, P. Caulk, Y. Chiang, M. Coyne, C. Dahlke, A. D. Mays, M.
Dombroski, M. Donnelly, D. Ely, S. Esparham, C. Fosler, H. Gire, S. Glanowski, K. Glasser, A. Glodek, M. Gorokhov, K. Graham, B. Gropman, M. Harris, J. Heil, S. Henderson, J. Hoover, D. Jennings, C. Jordan, J. Jordan, J. Kasha, L. Kagan, C.
Kraft, A. Levitsky, M. Lewis, X. Liu, J. Lopez, D. Ma, W. Majoros, J. Mcdaniel, S. Murphy, M. Newman, T. Nguyen, N. Nguyen, M. Nodell, S. Pan, J. Peck, M.
Peterson, W. Rowe, R. Sanders, J. Scott, M. Simpson, T. Smith, A. Sprague, T.
Stockwell, R. Turner, E. Venter, M. Wang, M. Wen, D. Wu, M. Wu, A. Xia, A.
Zandieh, and X. Zhu (2001), “The sequence of the human genome” Sci. …, vol.
291, no. February,.
[34] Wang, Y.- (2009)M. , “Recent advances in fiber-optic DNA biosensors” J. Biomed.
Sci. Eng., vol. 2, no. 5, pp. 312 317. –
[35] Wei, F., P. Patel, W. Liao, K. Chaudhry, L. Zhang, M. Arellano-Garcia, S. Hu, D.
Elashoff, H. Zhou, S. Shukla, F. Shah, C. M. Ho, and D. T. Wong (2009),
“Electrochemical sensor for multiplex biomarkers detection” Clin. Cancer Res., vol. 15, no. 13, pp. 4446 4452. –
[36] Wei, Y. S., Q. Q. Jin, and T. Z. Ren (2011), “Expanded graphite/pencil-lead as counter electrode for dye-sensitized solar cells” Solid. State. Electron., vol. 63, no.
1, pp. 76 82. –
[37] Yang, I. V and H. H. Thorp (2001), “Modification of indium tin oxide electrodes
74
with repeat polynucleotides: electrochemical detection of trinucleotide repeat expansion” Anal Chem, vol. 73, no. 21, pp. 5316 5322. –
[38] Zhang, Q. and V. Subramanian (2007), “DNA hybridization detection with organic thin film transistors: Toward fast and disposable DNA microarray chips” Biosens. Bioelectron., vol. 22, no. 12, pp. 3182 3187. –
[39] McNaught, A. D. and A. Wilkinson, Eds. (1997), IUPAC. Compendium of Chemical Terminology, 2nd. Blackwell Scientific Publications, Oxford.
75
PUBLICATIONS
1. Trieu V. V. Q., Nguyen H. N., Chu T. X. and Mai A. T. (2016), Simple Anodic Stripping Voltametry Method For the Determination of As3+, ICAMN2016, p. 191 - 194, ISBN: 978-604- -0010-7. 95
2. Trieu V. Q., Tran Th. L., Vu D. H Tong D. Hien, Mai .A. T. (2014), Development of a portable data acquisition device for electrochemical biosensor application, ICAMN2014, p. 71-75, ISBN: 978-604-911-946-0.
3. Tran Th. L., Chu T. X. , P. Q. Do, D. Th. Pham, Trieu V. Q., , D. C. Huynh and Mai .A. T. (2015), In-Channel-Grown Polypyrrole Nanowire for the Detection of DNA Hybridization in an Electrochemical Microfluidic Biosensor, Journal of Nanomaterials, vol. 2015, Article ID 458629, 7 pages. doi:10.1155/2015/458629.
4. Luu T. H. T., Tran Th. L D. Th. Pham, Trieu V. Q, Pham V. T., Ta T. N. A., Chu T.
X., Mai .A. T. (2015), Fabrication of PDMS-based Microfluidic Devices Toward Biomedical Applications, Tp ch Khoa hc v Công ngh cc Trưng Đi hc K
thut, 105A, p. 38 - 42, ISSN: 2354 - 1083.
76
APP APP APP APP
APPEND END END END ENDIX IX IX IX IX
//--- ---
// C main line
//--- ---
#include <m8c.h> // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
#include "RefMux_1.h"
#include "stdlib.h"
#include <stdio.h>
#include "delay.h"
#include "string.h"
#include "math.h"
volatile int tick2ms = 0; volatile char flag2ms = 0; volatile int tick1s = 0; int max_val = 0;
char flag_range;
BYTE Port0_shadow_register = b00000001;0
#define button_1 0x01 // 0b00000001 - P0.0 //choose 1, 2, up, down
#define button_2 0x10 // 0b00010000 - P0.4 //write button
#define button_3 0x04 // 0b00000100 - P0.2
#define MINVAL 0
#define MAXVAL 510
void delay1ms(void) {
Delay50uTimes(20);
}
void delay_ms(WORD factor) {
int i;
for (i=0; i<=factor;i++) delay1ms();
}
#pragma interrupt_handler Timer8_1_ISR //set timer interrupt to 2ms to get 1s period _ ASV scan
void Timer8_1_ISR(void){
;
flag2ms = 1 //flag 2ms is used to check DAC condition later tick2ms++;
) if (tick2ms == 499
{
; tick2ms = 0 tick1s++;
} }
77
const int CV_0_3_0_6_vs_Ag[] = //voltage from 0.2V to 0.53V (compared to - Ref: 0.38 to 0.35V)-
{
154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154
};
int Pointer;
#pragma interrupt_handler Timer24_1_ISR //each value in the table will be set after 200ms > scan rate 25mV/s-
void Timer24_1_ISR(void){
DAC9_1_WriteBlind(CV_0_3_0_6_vs_Ag[Pointer]);
Pointer++;
; if(Pointer >= 292) Pointer = 0 }
void Start(void){
BYTE bRefSignal;
bRefSignal = RefMux_1_AGND;
RefMux_1_RefSelect(bRefSignal);
RefMux_1_Start(RefMux_1_HIGHPOWER); //reference voltage 2.390V LCD_1_Start();
UART_1_IntCntl(UART_1_ENABLE_RX_INT);
UART_1_EnableInt();
UART_1_Start(UART_1_PARITY_NONE);
//UART_1_PutChar(41);
}
char buffer[5];
void send_ADC(int Data) {
; buffer[0] = Data/1000+ '0'
78
; buffer[1] = (Data%1000)/100 + '0'
; buffer[2] = ((Data%100)/10) + '0'
; buffer[3] = ((Data%100)%10) + '0'
; buffer[4] = '\0'
UART_1_PutString(buffer);
//UART_1_PutChar(10);
}
int readadc(void) {
return ADCINC_1_iClearFlagGetData();
}
void Display_int(int value){ //display int type value in form of ten base to LCD
char str[10];
LCD_1_PrString(itoa(str, value, 10));
}
void Display_float_range_10_100(int val){
float division;
int *status;
)- ;
division = ((val*3.11E-4 1.233)*10 LCD_1_PrString(ftoa(division, status));
}
void Display_float(float val){
int *status;
LCD_1_PrString(ftoa(val, status));
}
char check_ASV_button(void){
if(!(PRT0DR&button_1)) {
; return 1 }
; else return 0 }
char check_CV_button(void){
//if (!(PRT0DR&button_3)) if ((PRT0DR&button_3)) {
; return 1 }
; else return 0 }
int check_button(void){
PRT0DR = Port0_shadow_register;
if (check_ASV_button()) { Delay10msTimes(8);