Search found 7 matches

by yturgut
08 Jun 2010 20:57
Forum: mikroC General
Topic: ADC Read RS232
Replies: 13
Views: 6260

Re: ADC Read RS232

Code gives correct outputs now. 0V=0 and 5V=255, 3v=153 and so on.. unsigned short temp_res ; unsigned char buf[7]; void main() { Usart_Init(19200); ADCON1 = 0x80; TRISA = 0xFF; do { temp_res = ADC_Read(0) >> 2 ; ByteToStr(temp_res,&buf[i]); for(i = 0; i < 7; i++) { Usart_Write(buf[i]); Delay_ms(100...
by yturgut
07 Jun 2010 08:58
Forum: mikroC General
Topic: ADC Read RS232
Replies: 13
Views: 6260

Re: ADC Read RS232

nop, not that :)

It was about max232 IC, when I removed it, whole system works perfectly! So it was a hardware issue, my mistake.

Thank you for your help :wink:
by yturgut
06 Jun 2010 18:43
Forum: mikroC General
Topic: ADC Read RS232
Replies: 13
Views: 6260

Re: ADC Read RS232

My code is as following ; unsigned short temp_res ; char buf[7]; int i; void main() { Usart_Init(19200); ADCON1 = 0x80; TRISA = 0xFF; do { temp_res = ADC_Read(0) >> 2 ; ByteToStr(temp_res,&buf); for(i = 0; i < 7; i++) { Usart_Write(buf[i]); Delay_ms(10); } } while (1); } Terminal Output and Simulati...
by yturgut
06 Jun 2010 15:41
Forum: mikroC General
Topic: ADC Read RS232
Replies: 13
Views: 6260

Re: ADC Read RS232

I am using mikroC 8.2.0 and directly to rs232 port - no converters.

I am pretty sure that this is a software problem because simulation and implementation return same (wrong) results.

Anyone can give me a hand here ? :oops:
by yturgut
06 Jun 2010 00:26
Forum: mikroC General
Topic: ADC Read RS232
Replies: 13
Views: 6260

Re: ADC Read RS232

baud rates are correct at both ends, I know this is an easy trick but can't seem to handle :evil:
by yturgut
05 Jun 2010 00:12
Forum: mikroC General
Topic: ADC Read RS232
Replies: 13
Views: 6260

Re: ADC Read RS232

same retarded outputs, nothing changed.
thanks for the reply though.

this is my output ;
+Ă«+Ă«+Ă«VĂ«ĂĄĂ«ĂĄĂ«ĂĄĂ«+Ă«+Ă«ey=dy=ĂĄĂ«

and no my input is not arabic (:
by yturgut
04 Jun 2010 23:09
Forum: mikroC General
Topic: ADC Read RS232
Replies: 13
Views: 6260

ADC Read RS232

Hi everyone, I am trying to get analog data from AN0, convert it and send through rs232. My circuit is working fine and simulations return as expected. My only problem is that when I start the circuit, hyperterminal displays weird chars. I know hyperterm is not suppose to view binary data thats wher...

Go to advanced search