Hi all, i want to send floating point value to 8 bit port of pic18f452. i am using HITECH C software for coding. for example a=2,4536, i want to send this value to any of PORT of pic18f452. help me in this.
You should clarify, how you intend the 8-Bit port to represent a float value. The HITECH C compiler is supporting all float operations provided by the C standard.
actually i am doing wireless pressure control. for this i am preparing two nodes. in one node i am taking voltage value from pressure tank and i am transmitting the same value to the control node. whr i am implementing PI algorithm to control control valve. for this Kp, KI ,error values are in floating point values. so i want to take PI value which is in floating point and i want to trasmitt to the DAC from the 8 bit port. from DAC i wil take corresponding current value to control control valve.
so help me how to take floating point value to the 8 bit port to send to the DAC0808.
The DAC0808 is only an 8-bit DtoA converter, you cant send it floating point values.
One way to do it would be to convert your output from the PI controller to a percentage of full scale. Then output to the dac the same percentage of the dacs full scale.