The Elektor Forum will close. See also this link. From Friday March 1st it is no longer possible to log in to the forum. However, the content of the forum will remain visible until the end of March. As of April 1st the forum will definitely go off the air.

i2c with tc74 pic18f4455

An Elektor Distance Learning Course

Postby juanlu » Tue Oct 16, 2012 12:00 am

Hi,

I am doing learning course of embeded pic microcontroller, everthing ok till chapter 10 i2c comunication with sensor temperature TC74.

The lcd display is allways showing 255. It seems I have no reply from sensor.

Hardware seems ok the only part I do not know how to check is the sensor tc74.

For software I have tried the program of the CD course but does not work properly.

Any idea to help me?

Thanks
juanlu
 
Posts: 4
Joined: Thu Jan 02, 2014 10:49 am

Postby geenbert » Thu Oct 18, 2012 12:00 am

Here's a couple of things that you could check:

Software:

Use the sources on the CD (as you already did) to eliminate any typos.

Hardware:

Make sure the board is powered and connected to the programmer board as shown in Figure 361.
Run assignment 10.c to see of the TC74 acknowledges your commands.

Board:

1. The partnumber (printed on the TC74) should be TC74 A0 5.0 VAT.
2. The metal part of the TC74 should be facing away from the board.
3. All pins should be soldered without defects.

Let me know if this helps.
geenbert
 
Posts: 83
Joined: Thu Jan 02, 2014 10:41 am

Postby dirk_999 » Sun Oct 21, 2012 12:00 am

I have the same problem as JuanLu
dirk_999
 
Posts: 11
Joined: Thu Jan 02, 2014 10:49 am

Postby geenbert » Sun Oct 21, 2012 12:00 am

And when you tried the checks I suggested the results were...?
geenbert
 
Posts: 83
Joined: Thu Jan 02, 2014 10:41 am

Postby juanlu » Sun Oct 21, 2012 12:00 am

Dear Geenbert,

Board connected according to Figure 361.
Part number is correct TC74 A0 5.0 VAT
Metal part of sensor facing away of the board.
Voltage in pcb board is 5V. With polymeter ÇI have verified connections of pull resistors and pins of microcontroller.

Doing this assignement LCD shows Error, in previous assignement LCD displays 255ºC.

// send result to the LCD screen
lcd_locate(0,0);
if (reply) lcd_printf("error ");
else
{
lcd_byte(temperature);
lcd_write(0b11011111);
lcd_printf("C ");
}

Hope this information can help us.

if you have any other suggestions I will try.

thanks
juanlu
 
Posts: 4
Joined: Thu Jan 02, 2014 10:49 am

Postby geenbert » Mon Oct 22, 2012 12:00 am

Hi JuanLu, here's a few more things you can check:

1. If you have an oscilloscope: with the program running check the signal on pins 2 and 4 of the TC74 (Figure 359 shows the pin lay-out).

2. With the unit powered but the program not running (use another program that doesn't use port B) measure the voltage on pins 33 and 34 on the microcontroller itself (Figure 18 shows the pin lay-out).

3. Measure the voltage on the TC74 between pins 3 and 5.

When measuring pins do not measure on the circuit board but measure on the actual pins. Be careful not to short-circuit pins while doing this.

If you have a camera please take a picture of the setup and attach it to your reply, just to make sure.
geenbert
 
Posts: 83
Joined: Thu Jan 02, 2014 10:41 am

Postby juanlu » Mon Nov 05, 2012 12:00 am

Dear Geenbert,

Sorry for late reply about i2c with tc74 topic. As I can not avance in this chapter i have passed to spi and now usb. Once I finish i will make assembling of i2c and tc74 and check points you commented but note I have not oscilloscope at home so only can use voltemeter.

NOw I have new query about part 12.1.3 USB slave string. As it is described in documents once I try to locate driver and after downloading program to micro and generating usb driver the system is asking me for mm_mchpusb.sys.


I have tried to locate this file wihtout results.
Any idea about this topic?

Thanks and best regards,
juanlu
 
Posts: 4
Joined: Thu Jan 02, 2014 10:49 am

Postby geenbert » Tue Nov 06, 2012 12:00 am

You need mm_mchpusb.sys for the EB006 programmerboard too. Since you are able to program, the driver must be on your PC somewhere. If it is not in the directory suggested in the course you need to run a search on your harddrive. Just as it says in the course.

BTW If you want to discuss a new topic it is best to start a new thread.
geenbert
 
Posts: 83
Joined: Thu Jan 02, 2014 10:41 am

Postby juanlu » Tue Nov 06, 2012 12:00 am

Dear GeenBert,

Thanks for your reply.

Note next time I will make a new thread for different topics

1/Problem with sys file is solved.

I have tried to locate the mm_mchpusb.sys in my computer but there was no in my computer in any directory.

I have copy the file mchpusb*.sys of CD course part of drivers of 00E6 board in my PC. Then rename to mm_mchpusb.sys and then the driver of the USB is properly installed.Program runs ok.

I have used the *exe file of course as I do not have VB.

What I can not understand is why this file shall be in my computer.

2/In CD of course there are two files of Flowcode that does not match the course document USB slave and USB slave ad read.Do you know if there is aditional information to this course?

Also I found that assignment 12f can not be made in we do not have VB and the flowcode program is not in CD course. Please correct if I am wrong.
juanlu
 
Posts: 4
Joined: Thu Jan 02, 2014 10:49 am

Postby geenbert » Wed Nov 07, 2012 12:00 am

Note next time I will make a new thread for different topics


Apparently not, because now you ask a question about USB

In CD of course there are two files of Flowcode that does not match the course document USB slave and USB slave ad read.


Correct, these programs are not in use and should not be on the CD. This section was removed from the course before it was even published because it required knowledge (and possession) of VB. It was felt that this was outside the scope of the course, and would make it much too difficult for the students. So you can safely ignore these files on the CD.

Also I found that assignment 12f can not be made in we do not have VB


Yes you can, you dont need VB to answer the question. It is not a course on PC programming, so the question is just a small "extra". As the course states do not worry if you don't know the answer.

and the flowcode program is not in CD course.


Correct. The answer is given in the answers section, but not as an actual program.'
geenbert
 
Posts: 83
Joined: Thu Jan 02, 2014 10:41 am


Return to Programming Embedded PIC Microcontrollers using Assembly, C and Flowcode

Who is online

Users browsing this forum: No registered users and 1 guest