Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to read PSX controller data using arduino.

I know that there are some libraries for this but I also want to learn the way of thinking how to write such code.

Can someone point me where I should start?

Is there any website that provides a tutorial for this?

share|improve this question
1  
When I Googled psx controller arduino I got over 100,000 results. How about reading some of those first? Then come back with a more specific question. – Nick Gammon Aug 24 at 5:05
    
most of them inform the way to use the library in arduino. I tried to read the library, but since I do not know where/how to start, I cannot understand them. especially in the .cpp file. in arduino website, there are only 2 or 3 libraries for this, one for standard digital controller and one for analog controller. I tried to use both with error on each, so I decided to try to understand the library code. – Codelearner777 Aug 24 at 5:23
    
First read Andrew J McCubbin's analysis of the protocol, then the library's .h, then the .cpp. Both library files should be quite straightforward one you have an idea of the protocol. – Edgar Bonet Aug 24 at 7:55
    
I read that and understand that protocol. What I would like to do is to program the arduino to act like that protocol. I can understand the .h but got lost in .cpp. The promising library also have error like I posted here. forum.arduino.cc/index.php?topic=420147.0 I got lost because I do not know the technique to translate the timing diagram to code. anyway, thanks. – Codelearner777 Aug 24 at 8:08
    
Hey! As mentioned below , the library is outdated but nevertheless reading the source code can give you a good idea of what going on an logic thats going on behind the scenes. – Mero55 Aug 26 at 8:10

The library you are trying to use is 8 years old. Latest update was 4 years old. It is implemented with the old Arduino SPI library. The library needs to be ported to the new Arduino SPI library.

Hardware emulation is all about learning how to decode signals and protocols, and last use micro-controller hardware to implement them. You will need some tools such as logic analyzer, signal level converters, etc.

A way to start learning is to write device drivers for the different buses/signals on the micro-controller such as SPI, I2C, UART, etc. The chip/module/device documentation helps you skip the first steps and go directly to designing and implementing a protocol.

Cheers!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.