Brandon Walderman

  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Brandon Walderman

  • Rank
  1. Hi Jack, Thanks for the reply. The Papilio Duo and the shield have been a blast so far. It turned out the first problem was that I was using the libraries and example files that came with DesignLab, rather than the modified examples found in the DesignLab_Examples GitHub repo. When I ran the CardInfo example from the GitHub repo on the ZPUIno, it worked correctly. Some extra work was needed to get this example working on the AVR. I've created a pull request here with the needed changes if you are interested: I forgot to mention I've been using a Classic Computing Shield with the Papilio Duo, so I needed to use the pins on the shield that the SD slot is connected to, and I didn't have the option of using flex pins. Brandon
  2. Hello, I'm working on an implementation of the HACK computer from Nand2Tetris. My experience has been almost all on the FPGA side so far. I have written a working CPU with keyboard input and VGA output, and now I want to use the AVR as a kind of bootloader. My goal is to load the computer's software from a file on an SD card using the Arduino SD library and then stream it to the FPGA which will copy it into the SRAM. Once the program is transferred, the AVR should tell the FPGA to begin executing it. As a first step, I'm trying to get the CardInfo example to run and verify that it can read an SD card, but I haven't had much luck. My experience so far has been with Verilog programming in Xilinx ISE, so I'm completely new to Arduino programming. The card.init() call fails with SD_INIT_TIMEOUT. For now, I'm using a blank FPGA circuit. I suspect something is wrong with the Arduino pin assignments for the AVR and I'm not sure how to verify I have the correct pins. The example file only has a variable for configuring the CS pin: const int chipSelect = 4; The example file doesn't mention the SCK, MOSI, or MISO pins. I tried running CardInfo with the default value of chipSelect = 4. Then I tried chipSelect = 10. Neither of these values worked. I looked up the pin-out diagram here: DUO pinout for CC.pdf. This states that the chip select pin is D16. I'm not sure what this maps to in C++ code though; chipSelect = 16 did not work either. How can I determine what the correct pin number to use is? Do I also need to setup the SCK, MOSI and MISO pins somehow? Thanks! -Brandon