Re: Beginner help with VHDL, Xilinx 9536XL, and ISE7.1
- From: cdsmith69@xxxxxxxxx
- Date: 5 Jan 2006 14:39:21 -0800
I've got to get a real newsreader set up insted of using google groups.
:-)
> so: [+3.3]-----[R]--->|---- [CPLD pin, or ground.]
> LED
Yup, this is now it is wired. I did that because I noticed that the
9536 can sink a lot more current than it can source.
>If you had inverted the switches, then you should have
>seen the expected behaviour:
> LEDS_OUT <= not SWITCH_IN;
I realize that, but I hate doing things like that without understanding
why it needs to be done. In the old days when I did PALs the software
I used then allowed you to specify a pin as active low, and when an
equation came out true, the pin would go low. If I saw something in
the documenation like that I would be satisfied and would throw in the
not... :-)
>You should be able to assign a 0 to each LED pin, and
>that should cause each LED to lite.
> LEDS_OUT <= "0000"; or LEDS_OUT <= (others => '0');
I tried LEDS_OUT <= "0000" thinking they would all light, but they
didn't. I then tried LEDS_OUT <= "1111" thinking that would work if
the outputs were being inverted. No dice. So I tried LEDS_OUT <=
"1010" thinking two would light and two wouldn't, I don't care which
for now, I just want to see something light up. But nothing happens.
:-(
>> 3. Why doesn't my counter count?
>Hmm... I'm a bit puzzled by this, too. Try making an up counter.
Will do, tonight.
> Also, the perferred way to act on a rising edge clock is
> if rising_edge( CLK_in ) then
I'll switch to that and see if it makes a difference. I did it the
other way because that is what they always did it in the ALDEC VHDL
tutorial I learned from.
>Also:IEEE.STD_LOGIC_ARITH and IEEE.STD_LOGIC_UNSIGNED are non-standard
>libraries. You're better off using IEEE.NUMERIC_STD, instead.
Those were thrown in there by the Xilinx software when I created a new
project. Being new to VHDL, I don't really understand what comes from
what libraries yet. :-)
>Out of curiousity, where does CLK_in come from and
>what is its frequency?
It comes from my function generator. Square wave output set to 3.3V.
Looks clean on my oscilloscope. I had the frequency low enough that I
could watch the count sequence on the LEDS, like around 1Hz.
>And do you know that your LEDS_OUT CPLD pins are actually
>connected to the LEDs and not something else?
Because the expected LEDS do light when I flip switches with "LEDS_OUT
<= SWITCH_IN. It's just the polarity in opposite what I expect. Plus,
I looked at the board layout to be sure, and took an ohm meter right
from the CPLD pins to the header and it measured connected properly.
I did do a UCF to assign the pins because I had already wired
everything up before I even wrote the program.
Which brings up another question. Does it matter if I put CLK on one
of the global clock pins? I didn't at first, but moved to to one
later. It didn't seem to make any difference on the counter's
behavior.
>And who knows, perhaps the
>board you bought from eBay has problems.
Yeah. The company I bought it from has been selling it for years, but
I guess that doesn't mean it's guaranteed to work right. I was looking
at it since my original post and I realized that it doesn't really have
proper bypass capacitors on it. There's just one 100uF electrolytic
cap near the CPLD. I suppose if that is causing power problems then I
might see issues with things like counters, but not with simple things
like running the switches right to the LEDS. I think I'm going to
tack solder a few bypass caps to the bottom and see if that changes
anything.
Thanks for the help. If I figure it all out I'll post here so everyone
knows what was wrong.
.
- Follow-Ups:
- References:
- Beginner help with VHDL, Xilinx 9536XL, and ISE7.1
- From: cdsmith69
- Beginner help with VHDL, Xilinx 9536XL, and ISE7.1
- Prev by Date: Re: Do you name your FPGA?
- Next by Date: Re: XC3S100/250/500E Availability?
- Previous by thread: Re: Beginner help with VHDL, Xilinx 9536XL, and ISE7.1
- Next by thread: Re: Beginner help with VHDL, Xilinx 9536XL, and ISE7.1
- Index(es):
Relevant Pages
|
Loading