belinda_sg
New Member
i am a newbie in PIC programming, even in assembly....
i am asked to use PIC18F2320 to do the following things:
i am given a lookup table like this
Input Voltage(x) Output Data(y)
2.75 7.1
2.80 7.2
2.85 7.3
2.90 7.4
as you can see, the relationship between y and x is y=2x+1.6.
i think i should do the follwoing things: first store the output data into EPROM, and form a lookup table, convert the input voltage into digital through ADC, and then relate these two through READ EPROM value...
but i am not sure of all of these things are correct or not...
can anyone help me in this?
and if possible, give me a short solution for that?
i have searched a lot websites, but hard for me to get a complete code example?
and the only ref i can get is the MIC's datasheet for the MCU, but there is no complete codes example...
really thanks for your help...
i am asked to use PIC18F2320 to do the following things:
i am given a lookup table like this
Input Voltage(x) Output Data(y)
2.75 7.1
2.80 7.2
2.85 7.3
2.90 7.4
as you can see, the relationship between y and x is y=2x+1.6.
i think i should do the follwoing things: first store the output data into EPROM, and form a lookup table, convert the input voltage into digital through ADC, and then relate these two through READ EPROM value...
but i am not sure of all of these things are correct or not...
can anyone help me in this?
and if possible, give me a short solution for that?
i have searched a lot websites, but hard for me to get a complete code example?
and the only ref i can get is the MIC's datasheet for the MCU, but there is no complete codes example...
really thanks for your help...