Need help with pseudo code !

D.D

Joined
May 5, 2012
Messages
1
Reaction score
0
Hello everyone,
I am not really good with coding and programming stuff, so I need to convert this code into C code:
---------------------------------------------------------------------------------------------------------------------------------

Main
Unsigned int temp_res
Unsigned char result [7]
Initialize ADC
TRISA ==> R0 is Input (Channel 0 Analog)
TRISC ==> RC7 is Input (Rx)
==> RC6 is Output (Tx)
Initialize Baud Rate // 9600 bps
Delay 1000 ms for stabilization

While (1)
{
Read from ADC to temp_res
temp_res = temp_res / 200
Write TEXT to UART1 ("The voltage is: ")
IntToStr(result, temp_res) // This is the name of this method exactly in MikroC (Integer to
String conversion)
Write TEXT to UART1 (result)
Write TEXT (" ")
Delay 1000 ms to ensure transmission
}
---------------------------------------------------------------------------------------------------------------------------------
Thanks !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top