View previous topic :: View next topic |
Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 19587
|
|
Posted: Thu Nov 23, 2017 7:48 am |
|
|
Just as a FYI, I've put together a 46K80, and done a basic software I2C test to a device on the bench here. Runs fine at both 32MHz, and 64Mhz. At 64, the clock timing was about 1% faster than at 32MHz, but still just under 100K.
The library is fine (5.075).
However I can make it hang, if the RB7 line does not go high properly. |
|
|
johanpret
Joined: 23 Oct 2006 Posts: 33 Location: South Africa
|
|
Posted: Thu Nov 23, 2017 7:50 am |
|
|
Compiler version Latest - 5.075
Tried with older versions as well same result. _________________ Johan Pretorius |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19587
|
|
Posted: Thu Nov 23, 2017 7:51 am |
|
|
So back to the questions we have already asked about your hardware. |
|
|
johanpret
Joined: 23 Oct 2006 Posts: 33 Location: South Africa
|
|
Posted: Thu Nov 23, 2017 7:55 am |
|
|
I use 2k pullup to 3V3. Let me flash LED in main loop. Now on timer interrupt.
This is making me crazy, He He. _________________ Johan Pretorius |
|
|
johanpret
Joined: 23 Oct 2006 Posts: 33 Location: South Africa
|
|
Posted: Thu Nov 23, 2017 7:57 am |
|
|
Maybe I must move pullup closer to OLED. Now connected with 4 wires about 20cm Long. I will look at shortening the wires. _________________ Johan Pretorius |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19587
|
|
Posted: Thu Nov 23, 2017 7:58 am |
|
|
2K is 'upper end' of the range for 3.3v, but should be OK at 100K.
However the big questions are about the decoupling and supplies to the chip. |
|
|
johanpret
Joined: 23 Oct 2006 Posts: 33 Location: South Africa
|
|
Posted: Thu Nov 23, 2017 8:00 am |
|
|
Let me decrease the resistance to 1K5. I'll give feedback. _________________ Johan Pretorius |
|
|
johanpret
Joined: 23 Oct 2006 Posts: 33 Location: South Africa
|
|
Posted: Thu Nov 23, 2017 8:02 am |
|
|
I have 100nF decouling close to each chip on the board. The display has no decoupling maybe I can add cap on the power pins on the display. _________________ Johan Pretorius |
|
|
johanpret
Joined: 23 Oct 2006 Posts: 33 Location: South Africa
|
|
Posted: Thu Nov 23, 2017 8:55 am |
|
|
Really does not make sense. I lowered the resistors to 1K5 I added extra capacitors and I remover the 20cm cable. Same result, work with 32MHz and not with 64MHz. Also checked with LED in main loop program is running. _________________ Johan Pretorius |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19587
|
|
Posted: Thu Nov 23, 2017 9:13 am |
|
|
The chip requires at least two such capacitors, _and_ a 10uF low ESR capacitor on the Vcap pin. This latter is vital. The chip runs internally on only about 1.8v, and this capacitor stabilises the regulator that feeds the core. |
|
|
johanpret
Joined: 23 Oct 2006 Posts: 33 Location: South Africa
|
|
Posted: Thu Nov 23, 2017 9:36 am |
|
|
Have 10uF on Vcap for pic and 1 x 100nF and 1 x 1uF _________________ Johan Pretorius |
|
|
johanpret
Joined: 23 Oct 2006 Posts: 33 Location: South Africa
|
|
Posted: Thu Nov 23, 2017 9:39 am |
|
|
I will try on different pic PIC18F26K40 and Pic18F67K22. _________________ Johan Pretorius |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19587
|
|
Posted: Thu Nov 23, 2017 11:04 am |
|
|
johanpret wrote: | Have 10uF on Vcap for pic and 1 x 100nF and 1 x 1uF |
Good.
Do you have a part number for this capacitor?.
It is so vital, and the problem is that if (for instance) the ESR is high, it can lead to erratic behaviour particularly when the speed increases...
Is the chip actually on a PCB?.
Good ground plane?. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1941 Location: Norman, OK
|
Did I miss something? |
Posted: Thu Nov 23, 2017 11:20 am |
|
|
The question was asked early on to verify the chip is actually running at 64mhz but I didn't see an answer.... is it confirmed to be at 64mhz with the led/scope test? _________________ Google and Forum Search are some of your best tools!!!! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19587
|
|
Posted: Thu Nov 23, 2017 11:29 am |
|
|
Agreed.
This should be the first test.
However I've seen these chips work OK, for a really basic test, and then go screwy, when you actually run more complex code.
Something like an LED flasher, together with a simple serial send/receive, and I'd start to be happy... |
|
|
|