Page 1 of 1

I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Thu Aug 27, 2020 4:51 pm
by chad
Just got a new chip and I am playing with it. I am trying to use the SSD1306 component and it works in software but if i choose the hardware
i2c I get these compiler messages.

Microchip MPLAB XC8 C Compiler (Free Mode) V1.45
Build date: Nov 15 2017
Part Support Version: 1.45
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_I2C.c:
122: #error "I2C does not have the SSPIF defined on this chip - does your chip support this feature?"
(103) #error: "I2C does not have the SSPIF defined on this chip - does your chip support this feature?" ^
144: #warning "I2C Master Mode may not be available on your current target device, switch to software mode."
(162) #warning: "I2C Master Mode may not be available on your current target device, switch to software mode." ^ (warning)
(908) exit status = 1
(908) exit status = 1

Error returned from [xc8.exe]

C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1

Autoclose turned off


Thanks,

Chad

Re: I2C Problem on Pic18f27k42

Posted: Tue Sep 01, 2020 2:31 pm
by chad
Bump.

Chad

Re: I2C Problem on Pic18f27k42

Posted: Thu Sep 03, 2020 1:13 pm
by Benj
Hi Chad,

We've looked at this and the register setup is totally different on this device. We will probably include support for it soon but for now can you use the software I2C channel instead?

Re: I2C Problem on Pic18f27k42

Posted: Thu Sep 03, 2020 3:07 pm
by chad
Sigh,

So why is this chip listed as supported? I would have chosen a different chip had I known that It was also half-arsed "supported".
I started with FC almost two years ago, I have yet to complete an actual project. I have spent good money on this software and at every turn something is broken or flakey. I started with the ST ARM line but hardware peripherals don't work, yet another half-arsed implementation. I recently bought the scada and sensors pack, only to discover that the scada only works with your scada hardware. I couldn't even get the temp sensor component to work.

At what point am I allowed to be annoyed?

Yes I can use the software i2c and take an enormous performance hit. The point is I shouldn't have to. How about you guys stop adding new marketing "support" for chips and actually verify and fix the stuff that you claim to support. I would call it false advertising.

Sincerely, an unhappy, paying, customer.

Chad
p.s. I think the timer stuff is also borked. I can't get the pwm component to work, it also
(big surprise), would appear to be broken.

:roll:

Re: I2C Problem on Pic18f27k42

Posted: Thu Sep 03, 2020 4:23 pm
by Benj
Hi Chad,
At what point am I allowed to be annoyed?
You're allowed to be annoyed at any point, sounds like you really have bounced from problem to problem which certainly isn't ideal and I can understand your frustration.
Yes I can use the software i2c and take an enormous performance hit.
The performance hit shouldn't really be that large with the software mode, I2C is a fairly slow bus and even in hardware mode you will likely be waiting for things to complete before the next thing can be transmitted or received. Saying this we will certainly have a go at getting hardware channels operational for you.
p.s. I think the timer stuff is also borked. I can't get the pwm component to work, it also (big surprise), would appear to be broken.
Is this also on the 27K42 device? The K42 devices were added recently on a user request and while we ensure the basics are working we don't nessisarily test out each and every peripheral on every device as that would consume all of our time and nine times out of ten the existing code will work just fine. We are a small team and instead try and deal with problems as they appear rather than test out every single feature on a chip that only one or two people may ever use. Whilst this is far from ideal taking the time and testing chips 100% would be great however this is not financially viable, I hope you understand.

If hardware I2C is a priority for you then I can certainly have another look and see if we can reign in the changes and cobble together something that will work. Also fixing things like timers and PWM should also be possible in a fairly short time frame, I already have an idea as to what might be causing problems here.
I started with the ST ARM line but hardware peripherals don't work, yet another half-arsed implementation.
What wasn't working for you on the ST-ARM hardware? This is one of our newest target ranges but as far as I know a lot of the advertised features should work ok out the box.

Re: I2C Problem on Pic18f27k42

Posted: Thu Sep 03, 2020 4:41 pm
by Benj
I've now pushed an update that should hopefully solve the PWM problems. Investigating the I2C issues now, it looks like we do support the new I2C layout already but for some reason this is not currently kicking in. Hopefully should be a quick fix.

edit, I've now pushed a fix for the I2C, hopefully it will allow channel 1 to work correctly, let us know how you get on and if it works ok I'll roll out the fix for channel 2 too. If it doesn't work then let us know and I'll have another go at it.

Re: I2C Problem on Pic18f27k42

Posted: Thu Sep 03, 2020 7:57 pm
by chad
I2c hardware crashes the chip.
PWM still doesn't work.

Chad

Re: I2C Problem on Pic18f27k42

Posted: Sat Sep 12, 2020 12:56 am
by chad
Any news? It has been 8 days.

Chad

Re: I2C Problem on Pic18f27k42

Posted: Mon Sep 21, 2020 11:26 pm
by chad
Been another 9 days still nothing.

Chad

Re: I2C Problem on Pic18f27k42

Posted: Tue Sep 22, 2020 2:49 pm
by LeighM
Hi Chad
Sorry for the delay. I think this is due to a backlog on PIC development time, especially due to the impact of covid on our activities.

Re: I2C Problem on Pic18f27k42

Posted: Thu Sep 24, 2020 4:13 pm
by Benj
Hi Chad,

Regarding the I2C peripheral, I think I may drop support for the hardware channels. Looking again at the registers the device implementation of I2C is very different to the way all the other PIC devices work and I will need to have a play with it to be able to fully understand how it's doing things. It looks to have a similar implementation to an ARM device where you don't get full control. For now please use the software channel or pick a different PIC device. Sorry for any inconvenience here.

Regarding the PWM which channels have you tried? It might be worth trying channels 1-4 and then channels 5-8 as these are different implementations in terms of the device registers. I'm having another scan through the code now but so far everything looks ok.

edit. I think I've now found and fixed the PWM issue. I'll keep my fingers crossed for you :D Latest fixes available via Help -> Check for updates menu. I'll have another scan of the I2C now and see if I can make any more progress.

edit2. I've looked again and unfortunatley now more sure that at the moment we will not be able to support I2C on the K42 devices and so I have removed the i2c peripherals from the definition files.

Re: I2C Problem on Pic18f27k42

Posted: Thu Sep 24, 2020 7:41 pm
by chad
* Edit. I had a frustrated remark that I have deleted.
Can you recommend a comparable chip that is more supported?

Thanks,

Chad

Re: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Fri Sep 25, 2020 5:50 am
by AbhijitR
Hello! Chad
good morning

Kindly excuse if my information is not relevant or helpful.

For last few months I am using 18F26K22 for some application, no doubt the memory is less as compared to 18F27K42 but I thought to share this information only because I used the I2C (hardware) in 18F26K22 for OLED display and it works fine, I don't know if this information is helpful for your for your application.

Thank you.

Abhi

Re: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Fri Sep 25, 2020 9:33 am
by Benj
Thanks for the suggestion Abhi,

Chad, can you confirm if the PWM is working correctly now and have you tried the software I2C on the K42 device? I'll see if I can get my hands on one to figure out the new I2C style as it could be a new standard Microchip is moving to with its new devices and need to get a handle on it.

Re: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Sat Sep 26, 2020 2:05 am
by chad
Abhi, That chip doesn't look bad, I'll look into it. Thanks!

Ben: I will get to the pwm this weekend and let you know what I come up with. The software I2C is working, I am running a display with it but the chip hangs when I try hardware.

Thanks,

Chad

Re: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Sat Sep 26, 2020 3:17 am
by chad
No go on the pwm.

Chad

Re: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Sat Sep 26, 2020 6:59 am
by AbhijitR
Hello! Chad
good morning
chad wrote:
Sat Sep 26, 2020 2:05 am

The software I2C is working, I am running a display with it but the chip hangs when I try hardware.
Below information is because of my experience on the same topic (hardware I2C and OLED display), I faced same problems like you regarding the chip getting frozen, I found the following settings by trial and everything worked well, may be it is of some help to you.

Build: Project Options
-Oscillator: HS (4-16)(external 16MHz)
-PLL: enable
Clock speed: 64000000Hz

Hardware Settings (I used SH1106 I2C)
Baud: 1M

I hope this is of some help.

Thank you.

Abhi

Re: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Sun Sep 27, 2020 12:57 am
by chad
Hi, I tried a number of settings and it didn't work. As of the latest version of the chip I can't even select hardware I2C.
It sounds like Ben might dig into the ship some more so maybe it will get fixed.

Thanks,

Chad

Re: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Wed Oct 07, 2020 2:47 am
by chad
Hey, Any news Ben?

Chad

Re: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Fri Oct 09, 2020 5:18 am
by chad
Hey I need to use pwm. Any News or is this just going to be yet another...

Chad

Re: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Wed Oct 14, 2020 4:45 am
by chad
Another week, still no response.

Chad

Re: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Sun Oct 18, 2020 10:30 pm
by chad
I have given up on this chip and help. More money wasted.

Chad

Re: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Mon Oct 19, 2020 2:04 pm
by Benj
Hi Chad,

Can you send us your PWM program and I will have a look at it for you. I can't spot anything further that might be causing issues. Did you update to the latest version of all the files using the Help -> Check for updates?

Renaming the title of the topic hasn't helped your cause, it kind of makes it sound like you gave up on this device weeks ago.

I2C won't be fixed for v8 which is why I dropped support for it. It's a big change and would require all I2C components to be updated.

Re: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)

Posted: Mon Oct 19, 2020 4:01 pm
by chad
Ben, FC team,

Like I have said in my earlier post I have been at this almost two years. All I have done so far is help debug a tool that I have paid, and continue to pay for. I want flow code to work. I love the idea and have hopes that I can eventually, actually use it to build things.

I will update the title if the chips starts working. Other wise it is a warning to others that this new and capable chip isn't supported. It's that simple. "I2C won't be fixed for v8 which is why I dropped support for it" There you go. Unsupported. What other peripherals don't work? How about ARM? That Is what I wanted to use and started with but there are a laundry list of things that are not "supported" with that as well. On your sales page you list thousands of chips that are "supported" but really aren't. This would seem to be an intellectually dishonest statement. Maybe you should come up with a list of chips that can actually use the paid for components rather than claiming to support everything, continuing to add chips that only might get fixed if someone complains about it enough and is properly deferential.

I am not making up these issues. If things worked you would not be hearing from me. I am not complaining about my admitted lack of programing ability, I am just trying to get core FC functionality or components working. You mention FC9 that is around the corner that will fix already "supported" functionality. That would have been nice to know beforehand. I am sure that I will have to pay more for that when it is available, and I most likely will.

I'm not ignorant to the fact that new things change the way they work. I understand that that a new chip might not function compatibly with a version rev, ie. FC8vs9.
I have a pile of STM dev boards and chips that sort-of work. I have a handful of these 27k40 chips that sort-of work. I just bought a handful of new chips 18f24k50's (the chip that you used on your board because I wanted to play with scada) that (*) work. And a pickit 4. In addition to the money I have spent on the software. I almost have the complete package and have yet to complete an actual project in two years. Dmx still doesn't work usablly.

I'm actually a super nice guy. I'll gladly help anyone that I can. But I am super frustrated and I am not the cause of the problems, Do I give up on stuff? Yes, they are totally out of my control. I don't have infinite time or patience to trouble shoot core FC / chip issues.
I just recently purchased more components. I continue to support this software, I am going to purchase another, the debug one. Even though most of the functionality is useless to me but I want to be able to use the scope, data recorder, and logger with the scada.

Put yourself in my shoes. How would you feel? How deferential would you be after two years and decent money spent. I seem to have an uncanny ability to find shortcomings.

What would you do?

Sincerely,
Chad

p.s. I do a full update every time I launch the app.
*Edit, I got the new chip running with some kind help from others.