arcadebench Posted October 21, 2015 Report Share Posted October 21, 2015 New guy here. Great group with a ton of good solutions here already! One issue I didn't find help with is a potential problem with the clock connected to the processor on the back side of the Papilio DUO. On the o-scope the clock on pins 16 and 17 just look like noise. On the FPGA side I do see a strong clock signal coming from that crystal swinging around 3V. But the processor clock crystal isn't making it beyond 0.5V and just looks like noise. The weird thing is, the code seems to compile and download fine. But the code just doesn't seem to run. Not sure if one depends on the other. Here's the code listing: #define ACTIVITY_INPUT_PIN 39#define SWITCH_CONTROL_PIN 30 void setup(){ pinMode(ACTIVITY_INPUT_PIN, INPUT); pinMode(SWITCH_CONTROL_PIN, OUTPUT);} void loop(){ digitalWrite(SWITCH_CONTROL_PIN, HIGH);} Pin 30 never goes high, but seems to float (tri-state) as well. I did check all voltages and the reset line on the processor. All seem fine. Has anyone else run into this issue? Quote Link to comment Share on other sites More sharing options...
Jack Gassett Posted October 22, 2015 Report Share Posted October 22, 2015 Hmmm, maybe your board is having a problem? Does any code run on the Atmega side of things? Maybe you can load the default code to the board again and see if there is any output on the serial port for the atmega32 when SW0 is in the up position?http://www.gadgetfactory.net/opmanuals/index.php?n=Main.PapilioDUO Here is a link to the test plan, you just need to do the software portion of it, don't worry about connecting the stimulus board or anything. Jack. Quote Link to comment Share on other sites More sharing options...
arcadebench Posted October 22, 2015 Author Report Share Posted October 22, 2015 Ok I figured out the disconnect. I did run the DUO test program and it runs fine. I also loaded in the Arduino Blink sketch. To my surprise, that worked as well. Looking at the code for blink, it puts the LED at pin 13: // Pin 13 has an LED connected on most Arduino boards.// give it a name:int led = 13; Looking at the schematic for both the Arduino R3 and the DUO, pin 13 on the processor is the RESET input. Wut? Then I found the pinout guide for the DUO on the hardware page: http://papilio.cc/index.php?n=Papilio.PapilioDUOHardwareGuide I then realized that the code isn't referring to pin 13 on the processor, rather pin 13 on the Arduino connector! (facepalm) So there must be some pin translation going on during compile that converts the Arduino connector pin to its corresponding pin on the processor. Still dunno why the clock looks funky on the o-scope. But the board seems to be working ok. Quote Link to comment Share on other sites More sharing options...
Jack Gassett Posted October 23, 2015 Report Share Posted October 23, 2015 Ah good, glad you got it worked out. Part of the cost of the Arduino compatibility is that it is a layer of abstraction on top of the physical hardware... Sorry for the confusion, its easier if you embrace the Arduino syntax I think. Jack. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.