Papilio DUO ATMega clock problem


Recommended Posts

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:


void setup()
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?
Link to comment
Share on other sites

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?


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.



Link to comment
Share on other sites

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:
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.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.