using C# for temperature control

C#, ASM, 8051, LM35, ADC0804...

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 6946 Views - Last Post: 12 June 2010 - 09:04 AM Rate Topic: -----

#1 kiwi_FPGA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 09-June 10

using C# for temperature control

Posted 09 June 2010 - 03:28 AM

Hi all!
nice to meet you!
I'm having problems with serialport in C#. I have project about communication between the PC and 8051 (exactly: auto change temperature). I need display the current temperature on Textbox (Windowform in C#).now i can dispaly current temperature but not exactly! Example: I sent data from 8051 to PC (10)but data to be display on Textbox (29). I dont know why!
please help me! Thanks so much!

Is This A Good Question/Topic? 0
  • +

Replies To: using C# for temperature control

#2 ragingben  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 170
  • View blog
  • Posts: 637
  • Joined: 07-October 08

Re: using C# for temperature control

Posted 09 June 2010 - 04:09 AM

Hi kiwi_FPGA, just to check, are you sending the string "10" and getting string "29" through to the text box? Or are you sending ASCII character 10 (new line) from 8051, and getting ASCII character 29 (group seperator)?

If you put breakpoint in the code where the the input is received, what is the input ther, 10 or 29?

Also what happens if you send 11, do you get 30 or something else?

Hope we can help :)
Was This Post Helpful? 1
  • +
  • -

#3 kiwi_FPGA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 09-June 10

Re: using C# for temperature control

Posted 09 June 2010 - 06:28 AM

yes thanks for your help!
i tested, with 8051 im using assembly,
-mov a,#10
mov sbuf,a
...=> on textbox display (29)

-mov a,#13  => textbox: 6b
-mov a,#15  => textbox: 3f
-mov a,#17  => textbox: 08
-mov a,#20  => textbox: 08


i dont know why!i think problems from my code assembly for 8051.
; ____________________________________________________________________________________
; temperature control
; LCD: P1.0-P1.7, RS:P3.5 ,RW:3.6 ,E:3.7
; BF:  P1.7

; ADC: P2
; WR:P3.1
; RD:P3.2
; INTR:P3.0

; DIEU KHIEN: UP,MODE,DOWN

;________________________________________________KHAI BAO______________________________________
INCLUDE 8051.MC

	RS				BIT	P2.5	
	E				BIT	P2.7	
	RW				BIT	p2.6	
	BF				BIT	p0.7	
	LCDPORT			EQU	p0	
	LCDDATA			DATA	30h	
	TOADO				DATA	31h	

	
	XOA_HIENTHI			DATA	32h		
	VE_DAUDONG			DATA	33h	
	LCD162           		DATA	34h	
	DICH_CT_RIGHT		DATA	35h	
	ONHT_OFFCT			DATA	36h	
	CT_LEFT			DATA	37h
	CT_RIGHT			DATA	38h	
	HT_LEFT			DATA	39h		
	HT_RIGHT			DATA	3ah	
	
	ROW1				DATA	3BH
	ROW2				DATA	3CH
	NHOA				DATA	3DH
	
;+++++++++++++
	TMIN				DATA	3eh
	TMAX				DATA	3fh
	TCUR				DATA	40h
	TSET				DATA	41h
	
	RD_ADC			BIT	p3.7
	WR_ADC			BIT	p3.6
	INTR_ADC			BIT	p3.2
	DATA_LCD			EQU	p1
	
;+++++++++++++
	MODE		BIT	p2.4
	UP		BIT	p2.3
	DOWN		BIT	p2.2
;
	QUAT        BIT   P3.3
	BONGDEN 	BIT   P3.4

;___________________________________________________________________________________________
;_____________________________________________MAIN__________________________________________

ORG	00H
	      JMP	MAIN                  
ORG	0030H

MAIN:

		MOV	XOA_HIENTHI,#01h		
		MOV	VE_DAUDONG,#02h		
		MOV	LCD162,#38h	      	
		MOV	DICH_CT_RIGHT,#06h	
		MOV	ONHT_OFFCT,#0ch		
		MOV	CT_LEFT,#10h		
		MOV	CT_RIGHT,#14h		
		MOV	HT_LEFT,#18h      	
		MOV	HT_RIGHT,#1ch           

		MOV	ROW1,#80h
		MOV	ROW2,#0c0h
		
		MOV	TMIN,#18
		MOV	TMAX,#40
		MOV	TSET,#32
		
		CLR 	QUAT
		CLR 	BONGDEN
	;	LCALL NGAT
		
	;	MOV   R1,P1
		
; ___________________________________________________________________________

		MOV	LCDDATA,LCD162	
		LCALL	KHOITAO_LCD	
		
		MOV	LCDDATA,DICH_CT_RIGHT
		LCALL	KHOITAO_LCD
		
		MOV	LCDDATA,ONHT_OFFCT
		LCALL	KHOITAO_LCD
		
		MOV	LCDDATA,XOA_HIENTHI
		LCALL	KHOITAO_LCD
;__________________________________________________________________________

HANG1:
		
		MOV	DPTR,#400h
LOOP:
		CLR	A
		MOVC	A,@a+dptr
		MOV	LCDDATA,A
		LCALL	WAIT_100ns
		LCALL	SENT_DATA
		INC	DPTR
		LCALL	WAIT_500ms
		CJNE	A,#"#",LOOP

HANG2:
		MOV	LCDDATA,ROW2
		CALL	KHOITAO_LCD
		
		MOV	DPTR,#450h
LOOP1:
		CLR	A
		MOVC	A,@a+dptr
		MOV	LCDDATA,A
		LCALL	WAIT_100ns
		LCALL	SENT_DATA
		INC	DPTR
		LCALL	WAIT_500ms
		CJNE	A,#"#",LOOP1
		
		LCALL	delay500ms
		LCALL	delay500ms
		LCALL	delay500ms
		
		MOV	LCDDATA,XOA_HIENTHI
		LCALL	KHOITAO_LCD
	
; DAI NHIET DO VA NHIET DO HIEN TAI, NHIET DO THIET LAP.		
HANG11:

		MOV	DPTR,#500h
LOOP3:
		CLR	A
		MOVC	A,@a+dptr
		MOV	LCDDATA,A
		LCALL	WAIT_100ns
		LCALL	SENT_DATA
		INC	DPTR
		CJNE	A,#"#",LOOP3		
		
HANG22:
		MOV	LCDDATA,ROW2
		LCALL	KHOITAO_LCD
		
		MOV	DPTR,#550h
LOOP4:
		CLR	A
		MOVC	A,@a+dptr
		MOV	LCDDATA,A
		LCALL	WAIT_100ns
		LCALL	SENT_DATA
		INC	DPTR
		CJNE	A,#"#",LOOP4
		
;_______________________________
		LCALL	TOADO_TMIN
		MOV	R7,TMIN
		LCALL	HEXTOBCD
		LCALL	HIENTHI
		
		LCALL	TOADO_TMAX
		MOV	R7,TMAX
		LCALL	HEXTOBCD
		LCALL  HIENTHI
		
		LCALL	TOADO_SET
		MOV	R7,TSET
		LCALL	HEXTOBCD
		LCALL	HIENTHI
		
		
START:		
		JNB	MODE,SETUP
		LCALL	TOADO_CUR
		LCALL  READ_ADC
	;	LCALL HIENTHI
		LCALL TRUYEN
		LCALL HIENTHI
		JMP	START
	
;___________________________________
SETUP:
SETUP_TMIN:
		LCALL	WAIT_100ns
		JNB	MODE,$
		LCALL	WAIT_100ns
LOOP_SETUP_TMIN:
		LCALL	TOADO_TMIN
		MOV	LCDDATA,CT_LEFT
		LCALL	KHOITAO_LCD	
		MOV	LCDDATA,#"*"
		LCALL  SENT_DATA
		
		JNB	UP,INC_TMIN
		JNB	DOWN,DEC_TMIN
		JNB	MODE,SETUP_TMAX
		JMP	LOOP_SETUP_TMIN
INC_TMIN:
		LCALL	delay500ms
		INC	TMIN
		MOV	R7,TMIN
		LCALL  HEXTOBCD
		LCALL  HIENTHI		
		JMP	LOOP_SETUP_TMIN
DEC_TMIN:
		LCALL	delay500ms
		DEC	TMIN
		MOV	R7,TMIN
		LCALL HEXTOBCD
		LCALL HIENTHI		
		JMP	LOOP_SETUP_TMIN	
;____________________________
SETUP_TMAX:
		LCALL	TOADO_TMIN
		MOV	LCDDATA,CT_LEFT
		LCALL	KHOITAO_LCD	
		MOV	LCDDATA,#" "
		LCALL	SENT_DATA
		
		LCALL	WAIT_100ns
		JNB	MODE,$
		LCALL	WAIT_100ns
LOOP_SETUP_TMAX:
		LCALL	TOADO_TMAX
		MOV	LCDDATA,CT_LEFT
		LCALL	KHOITAO_LCD	
		MOV	LCDDATA,#"*"
		LCALL	SENT_DATA
		
		JNB	UP,INC_TMAX
		JNB	DOWN,DEC_TMAX
		JNB	MODE,SETUP_TSET
		JMP	LOOP_SETUP_TMAX
INC_TMAX:
		LCALL	delay500ms
		INC	TMAX
		MOV	R7,TMAX
		LCALL	HEXTOBCD
		LCALL	HIENTHI		
		JMP	LOOP_SETUP_TMAX
DEC_TMAX:
		LCALL	delay500ms
		DEC	TMAX
		MOV	R7,TMAX
		LCALL	HEXTOBCD
		LCALL  HIENTHI		
		JMP	LOOP_SETUP_TMAX
;_________________________
SETUP_TSET:
		LCALL	TOADO_TMAX
		MOV	LCDDATA,CT_LEFT
		LCALL	KHOITAO_LCD	
		MOV	LCDDATA,#" "
		LCALL	SENT_DATA
		
		LCALL	WAIT_100ns
		JNB	MODE,$
		LCALL	WAIT_100ns
LOOP_SETUP_TSET:
		LCALL	TOADO_SET
		MOV	LCDDATA,CT_LEFT
		LCALL	KHOITAO_LCD	
		MOV	LCDDATA,#"*"
		LCALL	SENT_DATA
		
		JNB	UP,INC_TSET
		JNB	DOWN,DEC_TSET
		JNB	MODE,JMPSTART
		JMP	LOOP_SETUP_TSET
INC_TSET:
		LCALL	delay500ms
		INC	TSET
		MOV	R7,TSET
		LCALL	HEXTOBCD
		LCALL	HIENTHI	
		JMP	LOOP_SETUP_TSET
DEC_TSET:
		LCALL	delay500ms
		DEC	TSET
		MOV	R7,TSET
		LCALL	HEXTOBCD
		LCALL	HIENTHI		
		JMP	LOOP_SETUP_TSET
		
;____Nhay_______
JMPSTART:
		LCALL	TOADO_SET
		MOV	LCDDATA,CT_LEFT
		LCALL	KHOITAO_LCD	
		MOV	LCDDATA,#" "
		LCALL	SENT_DATA
		LCALL	delay500ms
		LJMP	START
;**************************************************************
;ADC
READ_ADC:
		SETB	RD_ADC
		CLR	WR_ADC
		NOP
		SETB	WR_ADC
		JB	INTR_ADC,$
		SETB	INTR_ADC
		CLR	RD_ADC
		NOP
DAOBIT:
		MOV	C,p1.7
		MOV	A.0,C
		MOV	C,p1.6
		MOV	A.1,C
		MOV	C,p1.5
		MOV	A.2,C
		MOV	C,p1.4
		MOV	a.3,C
		MOV	C,p1.3
		MOV	A.4,C
		MOV	C,p1.2
		MOV	A.5,C
		MOV	C,p1.1
		MOV	a.6,C
		MOV	C,p1.0
		MOV	A.7,C
		MOV	R7,A
;_____________________	DIEU KHIEN DEN VA QUAT	_____________________
CONTROL:
	
		CLR C
		MOV A,TSET
		SUBB A,TCUR
		JB CY,MO_QUAT
		CLR QUAT
		SETB BONGDEN
MO_QUAT:
		SETB QUAT
		CLR BONGDEN
		CLR CY
RET

;________________________________________CAC CHUONG TRINH CON________________		
HEXTOBCD:
		MOV A,R7 
		MOV B,#10
		DIV AB
		MOV R6,A
		MOV R7,B
RET
BCDTOASCII:
          	MOV     A,R6    	; A = 29H, packed BCD
          	MOV     R2,A      ; sao lu+u A va`o R2
          	ANL     A,#0FH    ; che nibble cao (A = 09)
          	ORL     A,#30H    ; chuye^?n tha`nh ma~ ASCII, A = 39H (`9')
          	MOV     R6,A      ; lu+u ke^'t qua? va`o R6 (R6 = 39H ASCII char)
          	MOV     A,R2      ; la^'y la.i gia' tri. A ban dda^`u
         	ANL     A,#0F0H   ; che nibble tha^'p (A = 20)
        	RR      A         ; quay pha?i 4 la^`n
        	RR      A         ;
        	RR      A         ;
        	RR      A         ; - > A = 02
        	ORL     A,#30H    ; chuye^? tha`nh ma~ ASCII
        	MOV     R2,A      ; lu+u va`o R2
RET
CHUYENSANGTHAPPHAN:
		MOV A,R1
 		MOV  B,#10
 		DIV  AB
 		MOV  R2,A
 		MOV  A,B
 		DIV  AB
 		MOV  R3,A
		MOV  R4,B
RET
HIENTHI1:
		MOV  A,R2
 		MOVC A,@A+DPTR
 		MOV LCDDATA,A
 		CALL SENT_DATA
 		MOV  A,R3
 		MOVC A,@A+DPTR
 		MOV LCDDATA,A
 		CALL SENT_DATA
 		MOV A,R4
 		MOVC A,@A+DPTR
 		MOV LCDDATA,A
 		CALL SENT_DATA
RET

HIENTHI:           ; TRONG DOAN NAY CHUYEN SANG MA ASCII XONG MOI HIEN THI DC

		MOV	A,R6
		ANL	A,#0fh	; CHE NIBLE CAO 
		ORL	A,#30h	; CHUYEN SANG MA ASCII 
		MOV	LCDDATA,A   ; CHUYEN VAO LCDDATA
		ACALL	SENT_DATA
		MOV	A,R7
		ANL	A,#0fh
		ORL	A,#30h
		MOV	LCDDATA,A
		ACALL	SENT_DATA
RET

KHOITAO_LCD:
		ACALL	TEST_BF
		CLR	RS
		CLR	RW
		MOV	LCDPORT,LCDDATA
		CLR	E
		SETB	E
RET	

SENT_DATA:
		ACALL	TEST_BF
		SETB	RS
		CLR	RW
		MOV	LCDPORT,LCDDATA
		SETB	E
		CLR	E
RET

TEST_BF:
		CLR	RS
		SETB	RW
		SETB	BF
RETEST:
		CLR	E
		SETB	E
		JB	BF,RETEST
		RET

TOADO_TMIN:
		MOV	LCDDATA,ROW1
		CALL	KHOITAO_LCD	
		MOV	TOADO,#07
GOTO_TMIN:
		MOV	LCDDATA,CT_RIGHT
		CALL	KHOITAO_LCD
		DJNZ	TOADO,GOTO_TMIN		
		RET	
TOADO_TMAX:
		MOV	LCDDATA,ROW1
		CALL	KHOITAO_LCD	
		MOV	TOADO,#12
GOTO_TMAX:
		MOV	LCDDATA,CT_RIGHT
		CALL	KHOITAO_LCD
		DJNZ	TOADO,GOTO_TMAX		
		RET
TOADO_CUR:
		MOV	LCDDATA,ROW2
		CALL	KHOITAO_LCD	
		MOV	TOADO,#04
GOTO_CUR:
		MOV	LCDDATA,CT_RIGHT
		CALL	KHOITAO_LCD
		DJNZ	TOADO,GOTO_CUR		
		RET
TOADO_SET:
		MOV	LCDDATA,ROW2
		CALL	KHOITAO_LCD
		MOV	TOADO,#13
GOTO_SET:
		MOV	LCDDATA,CT_RIGHT
		CALL	KHOITAO_LCD
		DJNZ	TOADO,GOTO_SET		
		RET
;****************************************************************	

WAIT_100ns:		
		MOV	R1,#100
		DJNZ	R1,$
		RET
WAIT_500MS:
		MOV	R1,#150
LOOPWAIT:
		MOV	R3,#200
		DJNZ	R3,$
		DJNZ	R1,LOOPWAIT
		RET	
		
DELAY500MS:
		MOV	R4,#10
		MOV	TMOD,#10H	;timer1 che do 1

LOOP_TIMER1_2S:
		MOV	TH1,#HIGH(15535)
		MOV	TL1,#LOW(15535)
		SETB	TR1
		JNB	TF1,$
		CLR	TF1
		DJNZ	R4,LOOP_TIMER1_2S
		CLR	TR1
		RET
NGAT:

		MOV SCON,#50H
		MOV TMOD,#20H
		MOV TH1,#0FDH
		CLR TI
		SETB TR1
		RET
TRUYEN:
		CALL NGAT
		MOV A,#20
		MOV SBUF,A
		NOP 
		NOP
		CLR TI
RET
;TRUYEN:
;		CALL NGAT
;		MOV  R1,P1
;		MOV  A,R1 
;		LCALL BCDTOASCII	; KHONG PHAI MOV A,@R1
 ;		MOV  SBUF,A
;		NOP
 ;		NOP
 ;		CLR  TI
;RET
NHAN:
		CALL NGAT
 		MOV  A,SBUF
 		MOV  DATA_LCD,A
 		NOP
 		NOP
 		CLR RI
RET
	
		
ORG		400h
		DB	"   PROJECT 4    #"
ORG		450h
		DB	" PC AND MCU 8051  #"
ORG		500h
		DB	"RANGE:    *     #"
ORG		550h
		DB	"CUR:     SET:   #"

END


this is my code for 8051.
I will happy for your help!
THANKS SO MUCH!

This post has been edited by JackOfAllTrades: 09 June 2010 - 07:15 AM
Reason for edit:: Added code tags.

Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5571
  • View blog
  • Posts: 11,908
  • Joined: 02-June 10

Re: using C# for temperature control

Posted 09 June 2010 - 09:47 AM

Other temp sensors I've used came with a datasheet describing how to use them.
For example, one would return a value that was really the electrical voltage across the sensor.
The datasheet supplied a formula you had to apply to that response to calculate the temperature.
Was This Post Helpful? 2
  • +
  • -

#5 kiwi_FPGA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 09-June 10

Re: using C# for temperature control

Posted 09 June 2010 - 10:02 AM

Thanks tlhIn'toq
I tested on real curcuit. I think problems here, convert Hex to BCD or Decimal to ASCII...anything other.
I cant find them. Can you help me?please!
Thanks alot!!!
Was This Post Helpful? 0
  • +
  • -

#6 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5571
  • View blog
  • Posts: 11,908
  • Joined: 02-June 10

Re: using C# for temperature control

Posted 09 June 2010 - 10:18 AM

So you are asking... "How do I convert hex to Decimal?"
Was This Post Helpful? 0
  • +
  • -

#7 kiwi_FPGA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 09-June 10

Re: using C# for temperature control

Posted 09 June 2010 - 11:33 AM

View PosttlhIn, on 09 June 2010 - 09:18 AM, said:

So you are asking... "How do I convert hex to Decimal?"

yes i need convert binary to ascii! help me!!!thanks you!
Was This Post Helpful? 0
  • +
  • -

#8 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5571
  • View blog
  • Posts: 11,908
  • Joined: 02-June 10

Re: using C# for temperature control

Posted 09 June 2010 - 11:40 AM

binary to ascii is not hex to decimal.

You need to figure out what kind of data your chip is providing (read the data sheet and instructions) before you do more.

In the mean time, you should read the MSDN for your need.
http://msdn.microsof...y/bb311038.aspx
Was This Post Helpful? 0
  • +
  • -

#9 kiwi_FPGA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 09-June 10

Re: using C# for temperature control

Posted 10 June 2010 - 09:31 AM

thanks you! this is my code. i converted ascii to hex and then convert hex to decimal, display on textbox(current temperature).temperature was view on textbox. but on LCD current temperature is 36, current temperature view on textbox is 3366. Can you help me! Thanks You!

This post has been edited by kiwi_FPGA: 10 June 2010 - 08:00 PM

Was This Post Helpful? 0
  • +
  • -

#10 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5571
  • View blog
  • Posts: 11,908
  • Joined: 02-June 10

Re: using C# for temperature control

Posted 10 June 2010 - 09:40 AM

Please use the code tags when posting code.

If the correct answer was 36, and you are getting 3366, then it looks like you are adding each digit twice.

Put a breakpoint at the start of the method and walk through it step by step with the F10 function key.
Watch the Locals and Autos pallets. These will show you the value of each variable, and will update when you move to the next line.
Actually watching your code execute line by line will let you visualize what your code is really doing.
This is a vital step in debugging. It is something we all do.

Once you watch your code, you will see where you are adding each character a second time.
Was This Post Helpful? 0
  • +
  • -

#11 kiwi_FPGA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 09-June 10

Re: using C# for temperature control

Posted 10 June 2010 - 11:50 AM

View PosttlhIn, on 10 June 2010 - 08:40 AM, said:

Please use the code tags when posting code.

If the correct answer was 36, and you are getting 3366, then it looks like you are adding each digit twice.

Put a breakpoint at the start of the method and walk through it step by step with the F10 function key.
Watch the Locals and Autos pallets. These will show you the value of each variable, and will update when you move to the next line.
Actually watching your code execute line by line will let you visualize what your code is really doing.
This is a vital step in debugging. It is something we all do.

Once you watch your code, you will see where you are adding each character a second time.

yes dear! thanks you very much!
Was This Post Helpful? 0
  • +
  • -

#12 LightPhoenix  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 08-June 10

Re: using C# for temperature control

Posted 11 June 2010 - 02:03 AM

Would you mind giving me the code you used?
I would like to see your finished code for reading out the temp.
Was This Post Helpful? 0
  • +
  • -

#13 kiwi_FPGA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 09-June 10

Re: using C# for temperature control

Posted 11 June 2010 - 03:41 AM

 { text });
            }
            else
            {
                //this.txt_nhietdo.Text = hextodecimal(converttohex(text));
                tx = converttohex(text);
             //   tn = hextodecimal(tx);
                this.txt_nhietdo.Text =tx ;


            }
        }
        private string converttohex(string ascii)
        {
            string hex = "";
            foreach (char c in ascii)
            {

                int tmp = c;
                hex += string.Format("{0:x2}", (uint)System.Convert.ToUInt32(tmp.ToString()));
            }
            return hex;

        }
       private int hextodecimal(string hex)
        {
            int dec;
            string moi = converttohex(hex);
           foreach(char k in moi)
           {
               int tp = k;
               dec = int.Parse(moi, System.Globalization.NumberStyles.HexNumber);
           }
            return dec;
        }']

yes dear this is my code!thanks you!

This post has been edited by kiwi_FPGA: 11 June 2010 - 03:44 AM

Was This Post Helpful? 0
  • +
  • -

#14 LightPhoenix  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 08-June 10

Re: using C# for temperature control

Posted 11 June 2010 - 06:10 AM

thx, but is this for cpu?
And this is an convertion what was the code for reading it out?
Was This Post Helpful? 0
  • +
  • -

#15 kiwi_FPGA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 09-June 10

Re: using C# for temperature control

Posted 11 June 2010 - 06:48 AM

this code im using to convert data. i sent data from 8051 to PC and im received data from COM port (ASCII code), to display the current temperature on textbox (PC), i converted ASCII code to hex and then convert hex to decimal to display! programming language im using to 8051 (assemply)
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2