Go to advanced search

by JonasE
Wed Apr 01, 2015 7:07 pm
Forum: Raspbian
Topic: SPI problem in newer kernals?
Replies: 2
Views: 517

Re: SPI problem in newer kernals?

Haha, of course. Now it works flawlessly. :roll:

Thanks a lot!

Best regards, Jonas
by JonasE
Tue Mar 31, 2015 7:33 pm
Forum: Raspbian
Topic: SPI problem in newer kernals?
Replies: 2
Views: 517

SPI problem in newer kernals?

Hi, In the newer kernels (like the one currently availble for download, 2015-02-16, 3.18) there seems to have been a change in the SPI IOCTL interface. I get errors about faulty parameters when I try to use it as I did before (http://rosenborg.homelinux.org/WP/?page_id=80). Looked in the sources, an...
by JonasE
Thu Nov 20, 2014 1:12 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Hi! Yes, my decoupling should be fine... And I actually think your 1.7MHz is within spec. ;-) I got a response from Microchip. They actually confirm there is a problem in the MCP23017. At least they have seen the problem before. So, as a general advice, don't use GPA7 or GPB7 as inputs when using a ...
by JonasE
Fri Nov 14, 2014 8:53 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Yes, I filed a support ticket. I still hope you and I got some pirated version of the IC that has issues.
by JonasE
Thu Nov 13, 2014 8:31 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

I hoked up the scope again, measuring the clock as the faulty 1:s are clocked out. The clock is ticking along nicely, not held low or anything by the MCP. So, no clock stretching as far as I can see.
by JonasE
Thu Nov 13, 2014 2:38 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Beautiful! :D
by JonasE
Thu Nov 13, 2014 8:33 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Yes. Now that it is confirmed I feel I can trust the rest of the pins some more. A simple reorganizing of used pins to my pod solves things for now.

A big "thank you" to Joan who spent time and energy to help me! And also thanks to everybody else that helped with comments.

Best regards, Jonas
by JonasE
Wed Nov 12, 2014 10:07 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Interesting! But you only get 255 when it fails? In either case, that should not happen...

Thank you so much for testing this. Now I somehow feel better. ;)
by JonasE
Wed Nov 12, 2014 8:04 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

If at all possible I would be very grateful if someone would test this. I find it hard to believe that Microchip makes bad IC's. (Or are there bad copies around? :?) There must be another explanation.
by JonasE
Wed Nov 12, 2014 7:47 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Initializing all registers had no effect, neither did setting the length to 1.

With some delay in the code I could get a reasonable sync on my scope. There is no question about it, the MCP outputs only 1:s when the error occurs. Except for bit 7 (the first one sent) sometimes.
by JonasE
Wed Nov 12, 2014 7:16 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Ok, now I tried using my function generator. At about 50Hz i got the same result as before. At about 1kHz I get something like one error/second. At 100kHz i get this: 128 10000000 2 0 00000000 2 128 10000000 2 0 00000000 2 128 10000000 2 0 00000000 2 128 10000000 2 0 00000000 2 127 01111111 2 128 10...
by JonasE
Wed Nov 12, 2014 7:39 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Also, the return value of the ioctl is always 2, no matter if i see the error or not.
by JonasE
Wed Nov 12, 2014 7:35 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

And yes, one byte at a time.
by JonasE
Wed Nov 12, 2014 7:33 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Yes, you are absolutely correct in your summary. Both 0x7F and 0xFF show up occasionally.

Ok, I will hook up my frequency generator tonight.

Nope, I don't initialize anything. So far I have trusted the reset circuit. I can try this as well!

Thanks alot for your input!
by JonasE
Tue Nov 11, 2014 5:29 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Did a quick test now.... Same thing happened on another IC on the board, and I also tested PORT A with the same problem. Only bit 7 gives the problem.
by JonasE
Tue Nov 11, 2014 8:58 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Hm, I haven't actually made the exact same test on another of the four. I can do that, no problem. Also hooking it up to my frequency generator is a good idea. I don't think it is a general problem with timing. I can do the same test on another pin on the same port without seeing the problem. It see...
by JonasE
Mon Nov 10, 2014 8:55 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Yes. And I do have level converters. I need to power the IC's using 5V as the boards I will debug using it runs at 5V. I have tried everything now. The bus now sees pullups of about 600 ohms, and still the problem remains. I don't use 5V from the Pi anymore, I added a 7805 to get super smooth 5V. Di...
by JonasE
Mon Nov 10, 2014 7:10 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

I added code for activating weak pullups, wrote 0xFF to 0x0C and 0x0D. I can see the effect on the pins but no, it did not solve the problem.

Best regards, Jonas
by JonasE
Mon Nov 10, 2014 2:13 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

If you put it that way.... Of course I will. ;)

Best regards, Jonas
by JonasE
Mon Nov 10, 2014 8:40 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Hm, do you think that would make a difference? I'm holding the pins low during the test using 4.7k pulldown resistors except for bit 7. Then, if I pull bit 7 low no error occurs. If I hold it high no error occurs (I think, when I think of it I never did test this for a longer period of time). Only w...
by JonasE
Sun Nov 09, 2014 9:21 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

The wiring consists of a "real" FR4 PCB and a short ribbon cable. I can shake things around without getting errors.

This is so strange!

Best regards, Jonas
by JonasE
Sun Nov 09, 2014 8:15 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

Hi,

Got the exact same problem at 100kHz, 400kHz and 1MHz.

Best regards, Jonas
by JonasE
Sun Nov 09, 2014 12:28 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

Re: MCP23017 problem

If I make a simple test program just reading the 8 input pins, printing the value when it differs from the last read, and holding the rest of the pins down to 0 using pulldowns, I get the following with about 30 seconds between: 128 10000000 0 00000000 128 10000000 0 00000000 128 10000000 0 00000000...
by JonasE
Sun Nov 09, 2014 8:52 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 problem
Replies: 35
Views: 7307

MCP23017 problem

Hi! I'm into old arcade PCB boards. I'm fixing and restoring them. I thought it would be cool to have my own debug tool. A tool that replaces the processor of the board, checks that address decoding works, verifies EPROM's... Well, you get the idea. I made a I/O board PCB for the PI using four MCP23...

Go to advanced search