guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Guzunty Pi. New users start here.

Thu Sep 18, 2014 10:43 am

Hi karlitos,

You will see when you look at gz_lcd.rpt that the core leaves quite a lot of capacity for additional functionality, I think you could save some external hardware by programming it to sense the encoders as well as interfacing to the display. Although encoders are quite simple, they are sensitive to latency, so sensing them directly on the Pi might mean you miss transitions if the encoder was rotated very quickly (of course, this may not matter to you).

I wish you the best of luck with your project. I think the surface mount daughter board will be fine if you have soldered SMD devices before, it can definitely be done. We designed the Guzunty board for those who would find SMD soldering off-putting, but an SMD board will likely work out cheaper as it doesn't require an expensive PLCC device socket.

Please don't hesitate to ask if you have any more questions.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

karlitos
Posts: 4
Joined: Tue Sep 16, 2014 8:48 pm

Re: Guzunty Pi. New users start here.

Tue Oct 14, 2014 1:26 pm

Hi guzunty,

it took me a while to get all the necessary components, but now I am ready to try to build the guzunty-LCD driver.

Your explanation of the LCD daughter-board connectors helped me a lot, thank you very much! Although, I am still little bit confused about the guzunty-board wiring. Especially the wiring of the JTAG connectors the CGK and GTS/GSR pins of the CLPD and the jumpers JP1-JP3.

I read the Guzunty anatomy Wiki page and the part about the configurable pins, but that did not fully cleared my confusion. Do I need the GTS1/2,GTR pins for running the display? When not it is ok to let the jumpers JP1-3 out and only connect the Jtag pins to R-pi ? Can I leave the GTS/GSR pins on the CLPD in this case unconnected ?

The clock pins GCK1-3 are connected to the the R-pi pins and to the Conn_17 P2. It appears to me, that the GCK3 is steering the LCD backlight. In the schematic I printed out is the GCK2 connected to the pins 12 (GPIO 18) and 21 (GPIO 21) on the R-pi. I can not find where goes the GCK3 beside the Conn17 P2.

Which part is the transistor Q1 in the LCD daughter board which is responsible for the lcd backlight ?

Sorry for so many questions, I will be very happy if you could provide any clearance. Thank you very much :!:

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Guzunty Pi. New users start here.

Tue Oct 14, 2014 2:15 pm

Hi karlitos,

Using the LCD daughter board, you don't need to make any modifications to the Guzunty board. All needed RPi signals are taken on the daughterboard directly from the RPi GPIO connector. So no worries there.
I am still little bit confused about the guzunty-board wiring. Especially the wiring of the JTAG connectors the CGK and GTS/GSR pins of the CLPD and the jumpers JP1-JP3.

I read the Guzunty anatomy Wiki page and the part about the configurable pins, but that did not fully cleared my confusion. Do I need the GTS1/2,GTR pins for running the display? When not it is ok to let the jumpers JP1-3 out and only connect the Jtag pins to R-pi ? Can I leave the GTS/GSR pins on the CLPD in this case unconnected ?
Generally, the JTAG jumpers should be left in the 'Program' position. It is completely safe to remove them entirely or move them to the 'Run' position, but you won't be able to reprogram the device without them. I just leave them in place all the time. The only reason you would wish to move them to the 'Run' position is if you had a core that needed every last I/O pin available, in which case you would swap them back each time you re-programmed the CPLD. Don't worry about feeling a little confused, it is a highly configurable peripheral. Confidence will grow and confusion diminish as you experiment.
The clock pins GCK1-3 are connected to the the R-pi pins and to the Conn_17 P2. It appears to me, that the GCK3 is steering the LCD backlight. In the schematic I printed out is the GCK2 connected to the pins 12 (GPIO 18) and 21 (GPIO 21) on the R-pi. I can not find where goes the GCK3 beside the Conn17 P2.
GCK2 is connected only to pin 1 of P5 on the LCD daughter boards. It is a spare signal. It could be connected to GPIO 18 if an application needed it, but its not connected by default because JP33 is open on the Guzunty unless you choose to reconfigure it. GCK3 doesn't go anywhere else than P2/17. It is wired on the daughterboard through P4/17, so it could be used to dim the backlight in the future, but that would require Linux driver support which is not yet in place in the fcbtft project as far as I know.
Which part is the transistor Q1 in the LCD daughter board which is responsible for the lcd backlight ?
The transistor is not critical, it just needs to be NPN and be able to pass enough current to light the backlight. A BC337 would likely do it, though as I mentioned above, the driver lacks support for backlight dimming and so you do not need it. You should just make the solder bridge on the daughterboard for now, pads 2 and 3.
Sorry for so many questions, I will be very happy if you could provide any clearance. Thank you very much :!:
Always a pleasure to answer your questions. I hope my answers helped. If you have any others, please don't hesitate to ask more.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

karlitos
Posts: 4
Joined: Tue Sep 16, 2014 8:48 pm

Re: Guzunty Pi. New users start here.

Thu Oct 16, 2014 7:19 pm

Hello guzunty,

I do no own the original guzunty board od the LCD daughterboard. My primary goal is to make an adapter which will allow me to use the Sainsmart display on Raspberry Pi. I have couple of this displays, so I am searchnig for some cheap solution which will allow me to make several adapters for low cost.

For this reason I am trying to find a minimal setup, which would allow me to connect the LCD to the Rapsberry Pi with two flat ribbon cables, stripboard (veroboard) and theXC9572XL soldered on an adapter. The result of today's soldering looks like this :) :
Image

I am trying to find minimal/optimal wiring which would result in so few wire jumpers and interrupts as possible. For this reason I am trying to eliminate all unnecessary connections and connectors. I will probably take the spare GPIOs and CPLD IOs out to pin headers for possible further use. I would be very glad if you could help me and correct my mistakes

As far my understanding goes are the JTAG pins on the CPLD only necessary for the programming and do not need to be connected to the RaspbPi the whole time. I could put them to a pin header and connect them to the GPIO's 17,22,23 and 24 for programming. I will also place the resistors R1,R2 and R3.

I assume I do not need to connect the GTS1,GTS2 and GSR. So the necessary connections between the R-Pi GPIO and the CPLD chip should be :

GPIO0/SDA < - - - > FB3MC17
GPIO1/SCL < - - - > FB3MC17
GPIO4 < - - - > GCK1
GPIO10/MOSI < - - - > FB4MC14
GPIO9/MISO < - - - > FB4MC17
GPIO11/SCLK< - - - > FB4MC11
GPIO14/Tx < - - - > FB3MC14
GPIO15/Rx < - - - > FB3MC15
GPIO25 < - - - > FB4MC2
GPIO8/CE0 < - - - > FB4MC15
GPIO7/CE1 < - - - > FB4MC5

VCC (pin1) < - - - > VCC (pin7, pin15, pin26) [The pin numbers can be different in my case, because I use the VQ44 package]

GND (pin6) < - - - > GND

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Guzunty Pi. New users start here.

Thu Nov 13, 2014 2:19 pm

Hi karlitos,

Sorry for the slow response, I must have missed the notification for this new message.

You are correct that the JTAG pins only need to be connected during programming. As for the rest of your connections, nothing jumps out at me as being wrong. Of course, without knowing what your core is going to be doing and what signals you have assigned where I can't say for sure.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

AndrewJ
Posts: 1
Joined: Tue Feb 10, 2015 6:24 am

Re: Guzunty Pi. New users start here.

Tue Feb 10, 2015 7:51 am

I'm having an unusual problem with my Guzunty Pi. The gz_load utility will allow me to upload the gz_test core to the device, and when I run gz_test I get the correct outputs on the Guzunty.

Once I have executed the gz_test program, and then exit it by pressing enter, I can no longer program the device. I thought I was on to something when it appeared that the powering everything off and removing the Guzunty, ran through a boot cycle, then reinstall the Guzunty. It worked once. I tried a couple of times after that and it didn't work.

I'm fairly experienced with electronics and soldering. I double checked the board, and all appears to be well. The fact that it did program, and can still run the installed core, leaves me a bit baffled.

I'm confident that I installed the correct software and have built everything correctly. Again, the fact that it can still run the core I installed makes me believe I have a good software installation.

I'm stuck. Got any advice?

Thanks.

A.

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Guzunty Pi. New users start here.

Tue Feb 10, 2015 8:39 am

We have seen a very few CPLDs that refuse to program, well under 1%.

I will PM you and arrange to get you a replacement device.

HTH,

Derek
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

Drin
Posts: 1
Joined: Tue Feb 03, 2015 1:03 am

Re: Guzunty Pi. New users start here.

Tue Feb 24, 2015 4:59 pm

Hello Derek,

May I ask how the wires are connected for the 7 segment driver example ? I am asking this question because when looking at the https://raw.githubusercontent.com/wiki/ ... G_1789.JPG picture, I don't see anything connected to the Ground Pin on P3 ( if you check behind the pink wire, you can see the ground pin without any wire attached ).

In my case, when I'm using the gz_test core with a light emitting diode + a 90 ohm resistor connected on pin 1 of P1 ( P1_1 = FB1MC2 ) and ground ( P3_4 ), everything works well.

But the led + resistor also blinks when connecting the positive wire to P1_1 ( FB1MC2 ) and the negative wire to the P1_2 ( FB1MC5 ).

Also, to my amazement, the polarity is not important - neg on P1_1 ( FB1MC2 ) and poz on the P1_2 ( FB1MC5 ) will trigger the blinking but in the reverse pattern. Why is that ?

Thank you for this great "toy" and for all your support !

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Guzunty Pi. New users start here.

Wed Feb 25, 2015 12:13 pm

May I ask how the wires are connected for the 7 segment driver example ?
You certainly can and you are absolutely right, the LED display has no ground connection, this is intentional.

A LED illuminates whenever current flows through it. It is a diode, so this will happen any time its anode is more positive than its cathode. The LED doesn't care whether its cathode is connected to ground or to an IO pin. It just does what it does based on the voltages at its two pins. :-)

So, if your LED is connected between two IO pins and the anode side is at '1' and the cathode side is at '0' it will illuminate. This is the only case that makes it light up; For '00' and '11', the two sides are at the same voltage, so there is no reason for current to flow. In the '0' anode, '1' cathode case, the LED behaves like the diode it is and blocks any current flow, so no illumination there either.

So that explains why your LED lights both ways round but at opposite times; the two outputs you connected it to are flipping up and down really fast and at different times. The LED will light whenever the pin on its cathode is '0' and the pin on its anode is '1', which for two bits busy flipping up and down will be true some of the time whichever way round you connect your LED.

In fact, if you use the LED driver core instead of the test core and depending on what characters the display is showing, if you look carefully you may notice a difference in intensity for the LED in one polarity than the other because one pin happens to be spending more time in the '1' state than the other.

So, why doesn't the 7 segment display have or need a ground? It is because the core is doing what is called 'multiplexing'.

If we used a ground, we would need 32 (4 digits x 7 segments and a decimal point) IO pins to drive it. While the Guzunty could provide that amount of IO, there would hardly be enough pins left to tell it what to display! Instead, we drive just one digit at a time, but so fast your eye sees all the digits at once.

Thus, we get all four digits using only 12 IO pins; 1 'enable' pin for each digit plus the 8 pins for each LED of the digit. The ‘enable’ pins provide a temporary ground to the eight LEDs, current flows and the appropriate segments of the digit illuminate. Using the same signals to drive multiple devices is called ‘multiplexing'. In this case, the multiple devices are the four digits of the display.

Did we get something for free? Not really, the display is slightly dimmer as a result because the digits are being illuminated one at a time. However, we can choose the current limiting resistor values to compensate for that, so in a way we did get a free lunch. :-)

The core uses a square wave output by the Pi on GPIO4 to tell it when to move to the next digit. When you use a signal like this to help the CPLD logic count the passage of time, it's called a 'clock' (though it doesn't tell the time, its more like the rhythm a drummer gives to a band). This clock is very fast to fool your eye. Armed with that knowledge, you don't have to take my explanation above on faith; If you change the demo code to slow the clock right down, you'll see the digit refresh happening with your own eyes. Go try it! :-)

Finally, have a look at the LED driver waveform page, https://github.com/Guzunty/Pi/wiki/gz_l ... r-waveform. The upper waveform shows the workings of the SPI interface, so it’s not relevant to our discussion here. The lower image shows the four digit enables (digit_enas) and it shows the seven segment signals (segments). Note that the displays I sourced did not have the decimal point working so I only needed seven signals.

The waveform tells you the same story as I did above but in chart form.

Well, almost the same story. In practice, the LED display I used was a common anode type which means that the digit enable signals provide a temporary voltage source and those segments we want to illuminate are set to a zero. The principle is the same, current still flows, just in reverse. You can buy common cathode display types and in that case the story is exactly as above (but you’d need a slightly modified core which no one has asked for so far).

See how the digit enable bits go high one after the other diagonally up to the right and note how the segment signals switch configuration at the same moment to form the different digits. Some segment signals stay low for more than one clock cycle. That is because successive digits both require that segment to be illuminated. Segment 1 needs to be on for all four digits, so it never goes high (when displaying the example ‘2013’). From that, you can figure out that segment 1 is the upper right segment of the seven.

Conversely, some signals stay low for more than one clock cycle because they need to be off in successive digits. Although the pattern looks a bit complicated, if you study it you’ll see that it repeats every time the digit enables start again at digit 0.

One last comment; note that some devices would not like an LED being attached between IO pins in this way, but the CPLD in the Guzunty is designed to eat this kind of job for lunch. I wouldn't recommend doing multiplexing directly on the GPIO pins of the Raspberry Pi. If the LEDs were low enough power, you might get away with it, but you're better off with using a device designed for the job.

Hope that helps. Do please get back to me with any follow up questions you may have.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

Bingo600
Posts: 14
Joined: Wed Nov 20, 2013 11:02 am

Re: Guzunty Pi. New users start here.

Mon Mar 30, 2015 9:00 pm

Hi Guzunty / Derek

I have Guzunty core gz_16o8i up and running on a 7$ Altera EPM240 board , *bay: 161340655250
I chose the Altera mostly for the price , but also for being able to run 1.8v as my Odroid U3 runs.
http://forum.odroid.com/viewtopic.php?f=80&t=11888

I have just followed a little VHDL course this summer, http://www.pyroelectro.com/forums/viewforum.php?f=26
I needed a levelshifter for the serial rx/tx , and the 1.8v usb-ttl adapter was $15.
So as i have several 3.3v usb-serials, i decided to play with VHDL. Instead of just a levelshifter.

I'm still a super VHDL newbie , and am doing my best to understand your cores.
But for now i'm happy to just see that it's working on the Raspi.

I'll soon do two pcb-mods , to separate IO-Bank2 VCC from the 3.3v , and connect it to the U3's 1.8v.

I was wondering if you have considered to switch to a larger CPLD , and maybe do some more fancy stuff.
I'd especially like to get simultainously outputs on the output pins , and the 240 cells in the Altera would have room for it.

I would have uploaded my doc's from the odroid forum here but max size is 64k.
Please contact me off-list if you are interested.

Thankyou for a very nice project.

And i hope the PI fan's doesn't kill me for mentioning another brand here.
I still have 4 Pi's and only one Odroid

/Bingo

Ohh : I have both ISE 14.7 and Quartus 13 installed on my Linux , so i can test setups on both of them.

Bingo600
Posts: 14
Joined: Wed Nov 20, 2013 11:02 am

Re: Guzunty Pi. New users start here.

Tue Mar 31, 2015 12:25 pm

I have separated the VCCio's for Bank2 , and is going to run some tests now

/Bingo

Bingo600
Posts: 14
Joined: Wed Nov 20, 2013 11:02 am

Re: Guzunty Pi. New users start here.

Tue Mar 31, 2015 8:13 pm

Looks good

I have 16o8i up and running on both RasPI & Odroid.

/Bingo

Return to “Other projects”