I2C-Master with PIC16F690 not working
Moderator: Benj
-
- Posts: 77
- Joined: Wed Jun 22, 2011 3:32 pm
- Has thanked: 17 times
- Been thanked: 11 times
- Contact:
I2C-Master with PIC16F690 not working
Hello Matrix Team,
in Flowcode6 works only the software-I2C and in Flowcode7 software and hardware is not working?
The datasheet says, that the master is present on this chip.
Please have a look to the attached PDF. The 6 chips of the datasheet have master and slave on board.
In Flowcode7 I compile only the I2C-Init and get errors. The message says, that I have to switch to software-mode, but I´m in software mode?????
Can you look to this situation, what happens and why is the hardware mode not running?
Thanks
Jörg
in Flowcode6 works only the software-I2C and in Flowcode7 software and hardware is not working?
The datasheet says, that the master is present on this chip.
Please have a look to the attached PDF. The 6 chips of the datasheet have master and slave on board.
In Flowcode7 I compile only the I2C-Init and get errors. The message says, that I have to switch to software-mode, but I´m in software mode?????
Can you look to this situation, what happens and why is the hardware mode not running?
Thanks
Jörg
- Attachments
-
- PIC16F690_I2C_Bug.pdf
- (375.49 KiB) Downloaded 197 times
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact:
Re: I2C-Master with PIC16F690 not working
Hi Jörg
I2C Hardware was not working on my FC7, but software mode I2C was working.
Maybe you try to compile again .
Gruss
Stefan
I2C Hardware was not working on my FC7, but software mode I2C was working.
Maybe you try to compile again .
Gruss
Stefan
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: I2C-Master with PIC16F690 not working
Hi Jörg,
The master mode on this device is a bit of a hybrid, it needs more firmware, so you might as well use our software channel.
Have a look at page 191 of the datasheet.
The master mode on this device is a bit of a hybrid, it needs more firmware, so you might as well use our software channel.
Have a look at page 191 of the datasheet.
-
- Posts: 77
- Joined: Wed Jun 22, 2011 3:32 pm
- Has thanked: 17 times
- Been thanked: 11 times
- Contact:
Re: I2C-Master with PIC16F690 not working
Hello matrix team,
I now found out, what happens. In my software was a I2C-component from Flowcode6 who was not running. I had to erase all belonging to the component
and place a new one from Flowcode7. Now Flowcode7 compiles in software-mode. What`s not correct in software mode is the value of the baud select.
I know, there is a limit in the upper frequency, but in the lower the displayed value is not shown correct.
Jörg
I now found out, what happens. In my software was a I2C-component from Flowcode6 who was not running. I had to erase all belonging to the component
and place a new one from Flowcode7. Now Flowcode7 compiles in software-mode. What`s not correct in software mode is the value of the baud select.
I know, there is a limit in the upper frequency, but in the lower the displayed value is not shown correct.
Jörg
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact:
Re: I2C-Master with PIC16F690 not working
Hi Jörg
Normal is 100kHz, 400kHz, 1Mega.
Is there something else?
Stefan
Normal is 100kHz, 400kHz, 1Mega.
Is there something else?
Stefan
-
- Posts: 77
- Joined: Wed Jun 22, 2011 3:32 pm
- Has thanked: 17 times
- Been thanked: 11 times
- Contact:
Re: I2C-Master with PIC16F690 not working
Hi Stefan,
the maximum clock frequency I measured is about 18khz.
This value is not the one who is setup into the custom box.
Setting up 100khz gives a clock frequency under 10khz@8mhz oscillator speed?
Jörg
the maximum clock frequency I measured is about 18khz.
This value is not the one who is setup into the custom box.
Setting up 100khz gives a clock frequency under 10khz@8mhz oscillator speed?
Jörg
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact:
Re: I2C-Master with PIC16F690 not working
Hi Jörg
Are you using the intern RC Oszi?
What about the delay. If you test a second on/off on a port output. is it 1Second or 5Second?
Can you post the program?
Stefan
Are you using the intern RC Oszi?
What about the delay. If you test a second on/off on a port output. is it 1Second or 5Second?
Can you post the program?
Stefan
-
- Posts: 77
- Joined: Wed Jun 22, 2011 3:32 pm
- Has thanked: 17 times
- Been thanked: 11 times
- Contact:
Re: I2C-Master with PIC16F690 not working
Hi Stefan,
here are the new facts:
The attachement shows all of what I did. New program in Flowcode7 with I2C-master. At first I compiled this program without errors.
Then I close Flowcode, opens again Flowcode, load the program and it appears a compiling error you can see on the PDF?????
With this setup I got a clock frequency of about 6,4khz. The intern oscillator is not touched, so he would run @ 4mhz.
The compiler doesn`t detect, that I was already in software mode????
What`s wrong there?
Jörg
here are the new facts:
The attachement shows all of what I did. New program in Flowcode7 with I2C-master. At first I compiled this program without errors.
Then I close Flowcode, opens again Flowcode, load the program and it appears a compiling error you can see on the PDF?????
With this setup I got a clock frequency of about 6,4khz. The intern oscillator is not touched, so he would run @ 4mhz.
The compiler doesn`t detect, that I was already in software mode????
What`s wrong there?
Jörg
- Attachments
-
- Flowcode7-PIC16F690_I2C_BUG.pdf
- (509.07 KiB) Downloaded 214 times
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact:
Re: I2C-Master with PIC16F690 not working
hoi Jürg
Same effect if I load the program with the I2C. It's shows software but gives an error.
If I change to Hardware, compiele and back to software,compiele, it's works again.
it's looks a little bit similar to the uart probeml from me...
http://www.matrixtsl.com/mmforums/viewt ... 64&t=19808
Stefan
Same effect if I load the program with the I2C. It's shows software but gives an error.
If I change to Hardware, compiele and back to software,compiele, it's works again.
it's looks a little bit similar to the uart probeml from me...
http://www.matrixtsl.com/mmforums/viewt ... 64&t=19808
Stefan
-
- Posts: 77
- Joined: Wed Jun 22, 2011 3:32 pm
- Has thanked: 17 times
- Been thanked: 11 times
- Contact:
Re: I2C-Master with PIC16F690 not working
Hi Matrix Team,
another info for the bug:
When the compile error appears --> switch to hardware --> switch back back to software --> compiling without error !?!
This happens after new starting Flowcode.
Can you have a second look to the scl frequency. There is a limit in the upper, I know. But the software speed is not the same you could
setup in the component box.
Jörg
another info for the bug:
When the compile error appears --> switch to hardware --> switch back back to software --> compiling without error !?!
This happens after new starting Flowcode.
Can you have a second look to the scl frequency. There is a limit in the upper, I know. But the software speed is not the same you could
setup in the component box.
Jörg
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: I2C-Master with PIC16F690 not working
Hello,
Here is I believe a fix for the component connections being broken when reloading a project.
I'll have a look at the speed of the software channel, what device family are you using and which baud rate?
Here is I believe a fix for the component connections being broken when reloading a project.
I'll have a look at the speed of the software channel, what device family are you using and which baud rate?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 77
- Joined: Wed Jun 22, 2011 3:32 pm
- Has thanked: 17 times
- Been thanked: 11 times
- Contact:
Re: I2C-Master with PIC16F690 not working
Hi Benj,
now is working with the founded breaking connections. Well done.
To the frequency:
The component setup (baud) = 100khz
The measured clock frequency = 6,76khz (@4mhz intern oscillator)
Device family is wriitten in the headline = PIC16F690
Jörg
now is working with the founded breaking connections. Well done.
To the frequency:
The component setup (baud) = 100khz
The measured clock frequency = 6,76khz (@4mhz intern oscillator)
Device family is wriitten in the headline = PIC16F690
Jörg
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: I2C-Master with PIC16F690 not working
Hi Jörg,
4MHz is fairly slow but yes I can see that the 6.76KHz is fairly slow so I'll have a look and see if we can do anything about this.
4MHz is fairly slow but yes I can see that the 6.76KHz is fairly slow so I'll have a look and see if we can do anything about this.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 77
- Joined: Wed Jun 22, 2011 3:32 pm
- Has thanked: 17 times
- Been thanked: 11 times
- Contact:
Re: I2C-Master with PIC16F690 not working
Hi Benj,
in my case you see 100khz at the component setup and gets 6,76khz from the cpu. Can you put in a dummy devider, so that the baud setup is nearly the same as the frequency coming out from the cpu?
Jörg
in my case you see 100khz at the component setup and gets 6,76khz from the cpu. Can you put in a dummy devider, so that the baud setup is nearly the same as the frequency coming out from the cpu?
Jörg