Thermocouple Amplifier MAX6675, SN-6675

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

Thermocouple Amplifier MAX6675, SN-6675

Postby wahie1989 » Sat Mar 07, 2015 1:34 am

hye,'

i did buy the :D Thermocouple Amplifier MAX6675, SN-6675 and download the sample coding.
however i could not compile it in my PIC16F877A.
the coding have too much error.

im using PCW H , PCW C compiler.

i think the command is not the same.

can u give me the coding that i can compile it to my PIC.


your cooperation is highly appreciated.

thank you. :D
wahie1989
Greenhorn
 
Posts: 2
Joined: Sat Mar 07, 2015 1:24 am

Re: Thermocouple Amplifier MAX6675, SN-6675

Postby ober » Mon Mar 09, 2015 9:55 am

Different compiler will fail to compile the code written with other compiler. I guess the purpose of sample code is for you to refer and develop your own code.

The sample code in tutorial: Getting Started with SN6675, it is written base on PIC16F887 under MPLAB X IDE v1.20 and XC8 Compiler V1.0.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: Thermocouple Amplifier MAX6675, SN-6675

Postby wahie1989 » Mon Mar 09, 2015 9:28 pm

hye,

tq for your response. i guess u'r right. im in the middle of designing my own coding. but in the tutorial it self, i dont know which pin to tied up working together.? which pin to check first and which pin to use? my example coding as below:
CODE: SELECT_ALL_CODE
include <16f877A.h>
#use delay(clock=20000000)
#fuses hs,noprotect,nowdt,nolvp
//#device adc=10
#define use_portb_lcd TRUE
#include <lcd.c>


#byte PORTa=5
#byte PORTb=6
#byte PORTC=7
#byte PORTd=8
#byte PORTe=9

int fo();
int foo();
int16 temp();
void readcelcius();

void main()
{
  // Init SPI
  setup_spi(spi_master |spi_l_to_h |

   spi_clk_div_16 );



  set_tris_a(0b00000001);    //Initialize input/output pin
  set_tris_b(0b00000000);    //0: output; 1: input


  setup_port_a(ALL_ANALOG);     //analog setup
   setup_adc(ADC_CLOCK_INTERNAL);
   set_adc_channel(0);           //Set adc pin at A0
   delay_ms(10);

   lcd_init(); //Initialize LCD
   delay_ms(100);


do{

fo = spi_read();
foo = fo;
(foo) <<= 8 & >>=3;
 output_high(pin_C2);
temp = foo * 25;

foo << 3;
output_low(pin_C2);

void readcelcius()
return foo;


}while(1);
}

/////////////////////

void readcelcius()
{

if(output(PIN_C2)==0 && input(PIN_C4)){

  lcd_gotoxy(1,2);
         lcd_putc("Real");   //Display real at lcd
else

lcd_gotoxy(1,2);
lcd_putc("cannot");


}
}
wahie1989
Greenhorn
 
Posts: 2
Joined: Sat Mar 07, 2015 1:24 am

Re: Thermocouple Amplifier MAX6675, SN-6675

Postby ober » Wed Mar 11, 2015 10:36 am

There are at least 3 pictures showing the connection, here are two clear picture. Image

Image

Hopefully it help.
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 9 guests

cron