Toshibass
Posts: 18
Joined: Fri Jan 03, 2014 3:10 pm

Re: Guzunty Pi. New users start here.

Mon May 05, 2014 7:34 pm

Hi Derek

I Tried it this afternoon, I was away over the weekend, its working perfectly, and its functioning exactly how I wanted it to, I wrote a couple of snippets of python code and I am already switching outputs from my test webpage via webiopi and updating the buttons On / Off, see attached, so I am ready to continue my project.

Thank you so much for adding these functions, I appreciate that you had to spend your free time doing this, for sure it will help me utilize this great expansion board, hopefully others will also make use of this enhancement.

It occurred to me that if you have updated the C and Python libraries does it mean these functions are available in other cores or are there separate libraries for each core (don't get me wrong I am happy with gz16o8i I am not trying to hassle you even more than I already did) I will perhaps try a different core to see what happens.

Thanks again and best regards

Toshi
Attachments
Guz.JPG
Guz.JPG (42.68 KiB) Viewed 4469 times

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

Re: Guzunty Pi. New users start here.

Mon May 05, 2014 7:52 pm

Awesome!

Yes, the same new API calls should work with other cores, I just haven't had a chance to test them.

I'll go ahead and close the GItHub issue. Please feel free to raise another issue if you hit any problems.

Oh, and good luck with your project. Please drop back later and tell us how its going.

best regards,

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

myxomatosis
Posts: 6
Joined: Sat Mar 29, 2014 3:58 pm

Re: Guzunty Pi. New users start here.

Sun Jun 29, 2014 1:46 pm

Guzunty,
I note:
"I've had even fewer (read, no) reports of failed builds or other problems getting the Guzunty hardware working."

I'll take you up on that!

I have just built one of your Guzunty's.I see nothing wrong with the build and have booted the Pi with the Guzunty attached.
No problems.
I've installed software as per the wiki instructions and SPI is enabled.

All the jumpers are as per instructions but when I load gz_test I get the following:

Guzunty loader v5.01, portions courtesy Xilinx, Inc.
XSVF file = gz_test.xsvf
ERROR: TDO mismatch and exceeded max retries
ERROR at or near XSVF command #8. See line #8 in the XSVF ASCII file.
ERROR: TDO mismatch and exceeded max retriesExecution Time = 0.070 seconds#

I've no idea what that means any suggestions?
Thank you.

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

Re: Guzunty Pi. New users start here.

Sun Jun 29, 2014 2:04 pm

You are indeed the first. :-) The problem is with JTAG signals somewhere.

Can you post photos of your build? Both sides please. Then I can eliminate anything obvious quickly.

best,

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

myxomatosis
Posts: 6
Joined: Sat Mar 29, 2014 3:58 pm

Re: Guzunty Pi. New users start here.

Sun Jun 29, 2014 2:57 pm

Sorry,
I can't upload photos to this forum due to "The file is too big, maximum allowed size is 64 KiB."!

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

Re: Guzunty Pi. New users start here.

Sun Jun 29, 2014 2:59 pm

No problem, you can send them to me. Guzunty at gmail.com
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

myxomatosis
Posts: 6
Joined: Sat Mar 29, 2014 3:58 pm

Re: Guzunty Pi. New users start here.

Sun Jun 29, 2014 3:05 pm

Posted.....if they don't bounce.

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

Re: Guzunty Pi. New users start here.

Mon Jun 30, 2014 10:16 am

Pics received.

Don't worry, we'll get you going for sure. :-)
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

NealB
Posts: 13
Joined: Wed Jul 11, 2012 11:58 am

Re: Guzunty Pi. New users start here.

Fri Jul 04, 2014 3:37 pm

Hello Guzunty
I think I am having the same TDO mismatch error as myxomatosis.
The first time of programming the device with the gz_test file I was successful, and everything checked out, I also had an LED flashing on fb1_2 - about once a second.
I then switched everything off and when I tried to use the gz_test program again I got the Press any key to stop test but the ports where not switching.
I then tried reprogramming the device with the gz_test and various other cores but all I now get is the TDO mismatch error with a reference to the error at or near XSVF command #48. See line#48 in the XSVF ASCII file.
Is it possible that we may have an SPI timing issue or have Xilinks changed the die or process?

The CLPD has the following markings:

XC9572XL
PC44AEN9949
F1109919A
10C

Any advice where to look would be appreciated.

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

Re: Guzunty Pi. New users start here.

Sat Jul 05, 2014 4:44 am

Hi Neal,

I have seen one previous case where the CPLD stopped working after initially passing the bring up tests. A replacement device was the solution.

Please check that your programming jumpers are still in place and in the Program position. If that doesn't help, please PM me with your mailing address and I'll send you a replacement part when I return from vacation next week.

Best,

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

NealB
Posts: 13
Joined: Wed Jul 11, 2012 11:58 am

Re: Guzunty Pi. New users start here.

Sat Jul 05, 2014 10:55 am

Hi Derek
Thank you for your quick response, sorry to disturbed your holiday.
I have rechecked the links and the are in place as per the build instructions.

Also I have had a college check for shorts and bad joints but he can not find any issues.
We have also tried the board on 2 other RPi's - rev1 & rev2 but with no luck.

I will send you my details but can you first confirm that the Email address
is:

guzunty

Neal
Last edited by NealB on Mon Jul 07, 2014 12:30 pm, edited 1 time in total.

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

Re: Guzunty Pi. New users start here.

Sat Jul 05, 2014 11:49 am

Correct. But can you edit your message so that the address is not easily recognised by a spam harvester please?

Many thanks in advance.

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

NealB
Posts: 13
Joined: Wed Jul 11, 2012 11:58 am

Re: Guzunty Pi. New users start here.

Fri Jul 11, 2014 8:36 pm

Thank you Derek for the replacement CLPD for my Guzunty.

The chip replacement has corrected my TDO mismatch error and my in ability to reprogram my board. Since changing the chip I have tried several different cores and several different loads and inputs.

I am very happy to report that my Guzunty is performing well.

Many thanks for your help.
Neal

myxomatosis
Posts: 6
Joined: Sat Mar 29, 2014 3:58 pm

Re: Guzunty Pi. New users start here.

Sun Jul 13, 2014 2:06 pm

myxomatosis wrote:Guzunty,
I note:
"I've had even fewer (read, no) reports of failed builds or other problems getting the Guzunty hardware working."

I'll take you up on that!

I have just built one of your Guzunty's.I see nothing wrong with the build and have booted the Pi with the Guzunty attached.
No problems.
I've installed software as per the wiki instructions and SPI is enabled.

All the jumpers are as per instructions but when I load gz_test I get the following:

Guzunty loader v5.01, portions courtesy Xilinx, Inc.
XSVF file = gz_test.xsvf
ERROR: TDO mismatch and exceeded max retries
ERROR at or near XSVF command #8. See line #8 in the XSVF ASCII file.
ERROR: TDO mismatch and exceeded max retriesExecution Time = 0.070 seconds#

I've no idea what that means any suggestions?
Thank you.

For anybody who comes across my post this is what happened.
I was unable to upload my photos to the forum - too big, but was invited to submit them by another route. The result of the photo examination was that failure was due to my poor soldering skills which Derek helped to rectify and I was then able to upload the gz_test core and get the SUCCESS message.
Thank you.

I have a working board so that means new questions for Derek!
Coming up in a new post.

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

Re: Guzunty Pi. New users start here.

Sun Jul 13, 2014 2:07 pm

Bring 'em on! :-)
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

myxomatosis
Posts: 6
Joined: Sat Mar 29, 2014 3:58 pm

Re: Guzunty Pi. New users start here.

Sun Jul 13, 2014 2:49 pm

Derek,

I bought a Guzunty because of :


GPIO pin protection
Removal of PCU load for repetitive tasks
Cheap introduction to CPLD devices
CPLD was connected to the Pi



Thankfully you helped me sort out my failed board by highlighting my very poor soldering. Mea Culpa.
Bear in mind that your article in Magpie 14 is labelled ADVANCED I'm in the Guzunty new starters part of the forum and in the 'juniors class', ( anybody else?) and possibly the dunce of that class.

I can successfully load the examples cores into the Guzunty and run the python examples. I had expected to look at an example and figure out how to turn On and OFF an LED and read the status of the pins and then push on further.
I now 'realize' I am unsure what to do next!

Preamble:

I've set myself three long term projects the only one of concern at the moment is that I am trying to set up a distributed sensor network. After 18 months, including setting up my garage as a workshop,I'm just about there.
Part of my aims for this is to get experience with 12C , one wire and SPI interfacing .Recently I decided to set about ordering some devices to do that and inadvertently realized in the Guzunty I have the SPI device.
You can see therefore that my bottom line is an interest in the I/O cores so I can do things like switch LED's ON etc.

I looked at the 16i8o python example and failed to understand much of the program but I will come back to that another time.

Questions:

I have a whole series of questions the answers to which I either do not know or remain unclear about or may even be a result of other misunderstandings. I''ll put these in separate forum posts.
Here is the first.

Hardware:


In your Magpi 14 Guzunty article you identify 25 free I/O pins on Guzunty board with 13 unused pins on the Pi.


Pi:
When you say 13 pins are also available from the Pi does this mean I'd need to attach a GPIO breakout board between the Guzunty board and the Pi( such as this http://shop.ciseco.co.uk/pi-wingman-8-i ... pberry-pi/ )?



Guzunty:

In your Magpi 14 Guzunty article you identify 25 free I/O board pins but on the Guzunty FAQ you say 'leaves an additional 30 IO pins available for expansion on the CPLD' as opposed to the 25 you previously identified on the board.

Looking at the pins without jumpers I count 34 board pins (I'm ignoring the power and Jumper pins.), I see three which seem to be dedicated or dual use pins eg GSR,GTS1 and GTS2 the rest of the pins are divided into functional blocks (FB) such as FB1 etc , Pin numberings appear in more than one FB eg pin 17 is in FB2 and in FB3.Pins 1, 2 and three are outside an FB but pins 2 and 5 are also in FB's .

Pins 1 and three seem only to have one instance. But pin 2 has three, one outside an FB and three inside an FB.
Is pin 17 in FB2 the same as pin 17 in FB3?

I can't see anything on the Guzunty wiki to help me and the Xilinx datasheet is way above my head for the moment.

In short I've had a look at the device labelling but am now very confused - today I can't do the maths!
Can you enlighten?
Thank you.


Regards,
Myxomatosis.

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

Re: Guzunty Pi. New users start here.

Sun Jul 13, 2014 4:38 pm

Part of my aims for this is to get experience with 12C.
Guzunty can't do I2C without some external resistors. I have it in my TO DO list to experiment with this and make some cores, but yet to get around to it. The same story with 1 wire. Guzunty support for SPI is good.
You can see therefore that my bottom line is an interest in the I/O cores so I can do things like switch LED's ON etc.
Yup, Guzunty will eat applications like that for lunch. :-)
I looked at the 16i8o python example and failed to understand much of the program but I will come back to that another time.
Please be aware that a lot of this program is making the screen look pretty. Only a very small part is actually operating or reading the CPLD pins.
In your Magpi 14 Guzunty article you identify 25 free I/O pins on Guzunty board with 13 unused pins on the Pi.


Pi:
When you say 13 pins are also available from the Pi does this mean I'd need to attach a GPIO breakout board between the Guzunty board and the Pi( such as this http://shop.ciseco.co.uk/pi-wingman-8-i ... pberry-pi/ )?
Yes, there are two general ways to do this; One is to use a breakout board such as the one you linked. The other is to build a Guzunty with a long pin connector such as this:

http://thepihut.com/products/extra-tall ... spberry-pi

Since you already have your Guzunty built the second way isn't an option for you.
In your Magpi 14 Guzunty article you identify 25 free I/O board pins but on the Guzunty FAQ you say 'leaves an additional 30 IO pins available for expansion on the CPLD' as opposed to the 25 you previously identified on the board.

Looking at the pins without jumpers I count 34 board pins (I'm ignoring the power and Jumper pins.), I see three which seem to be dedicated or dual use pins eg GSR,GTS1 and GTS2 the rest of the pins are divided into functional blocks (FB) such as FB1 etc , Pin numberings appear in more than one FB eg pin 17 is in FB2 and in FB3.Pins 1, 2 and three are outside an FB but pins 2 and 5 are also in FB's .
You are right about the GSR, GTS and GCK pins being dual purpose. They can be used as normal I/O pins, but they can also function as Global Reset, Global OutpuT Enable and Global ClocK respectively. For example, by routing clock signals to a GCK input rather than a general purpose I/O pin, you can make the finite resources of the CPLD go much further. This is why Pi GPIO4 is routed to GCK1 (check the schematic to see this), GPIO4 can be programmed to provide a hardware clock from the Raspberry Pi.

WRT the FB labels, I think you're confusing yourself a bit here. The FB numbers don't relate to pin numbers. They are Xilinx's own naming schemes for the pins. FB is short for 'Function Block'. Each function block can drive multiple CPLD pins, so FB1-2 is one I/O pin on function block 2. Please don't ask me why FB3 has an IO channel number 11 and FB1 does not. There is an underlying reason for the numbering, but you really don't need to know why to use the existing cores or even to design your own.

The Guzunty schematic will really help you get going. You can find it here https://github.com/Guzunty/Pi/wiki/Schematic

Look at the symbol in the middle right. It shows the FB style designations against the *chip* pin numbers. You don't really need to worry about the chip pin numbers, since the Guzunty labels each of the 34 header pins with the FB designation directly. However, seeing the FB designations against the actual pin numbers may help you get it clear in your mind.
Pins 1 and three seem only to have one instance. But pin 2 has three, one outside an FB and three inside an FB.
Is pin 17 in FB2 the same as pin 17 in FB3?
No. It's much simpler than that. To save space on the PCB, we only write the main FB number once, so FB1-2 is found by first locating 'FB1', then you locate the pin labeled 2. Similarly to locate FB2-2, you first find FB2, then find I/O pin 2 associated with it. So you can see that aren't multiple references to the same pin 2, there are four channel 2's, one in each of FB1, FB2, FB3 and FB4.
I can't see anything on the Guzunty wiki to help me and the Xilinx datasheet is way above my head for the moment.
Yes, the Xilinx data sheet is a bit terse. Data sheets for all devices take a bit of getting used to, TBH. Stick with it and you'll get there. In the case of the XC9572XL, it's made slightly more complex by the fact that there are two separate data sheets; one describing the properties of the device family and the other specifying the pinouts specific to the 9572 itself (and the different pinouts for the 4 different packages the device can be delivered in, help! You are only interested in the PC44 package).

You can work entirely with the FBX-X labelling. Each core has a report file. There is a section in there that shows the signals of the core related to the FB labelling in a nice simple table. Like this:

Code: Select all

** 9 Outputs **

Signal              Total Total Loc     Pin  Pin     Pin     Pwr  Slew Reg Init
Name                Pts   Inps          No.  Type    Use     Mode Rate State
outputs<6>          3     7     FB1_11  6~   GCK/I/O O       STD  FAST RESET
outputs<7>          3     7     FB1_14  7~   GCK/I/O O       STD  FAST RESET
outputs<0>          3     7     FB3_14  19   I/O     O       STD  FAST RESET
outputs<1>          3     7     FB3_15  20   I/O     O       STD  FAST RESET
outputs<2>          3     7     FB3_16  24   I/O     O       STD  FAST RESET
outputs<3>          3     7     FB3_17  22   I/O     O       STD  FAST RESET
outputs<4>          3     7     FB4_2   25   I/O     O       STD  FAST RESET
outputs<5>          3     7     FB4_5   26   I/O     O       STD  FAST RESET
miso                17    21    FB4_17  34   I/O     O       STD  FAST 
You simply look up the signal you want in the table. Read across to the 'Loc' column and read off the FB label. Then you find that pin on the Guzunty and that is the pin you need to wire up to that signal. So in this example output number zero is going to be found at FB3_14 on the Guzunty.

Hope that helps to begin with,

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

NealB
Posts: 13
Joined: Wed Jul 11, 2012 11:58 am

Re: Guzunty Pi. New users start here.

Mon Jul 14, 2014 6:45 am

Hello Derek
Can you help point me (and probably several others) in the direction of the Python code set for the Guzunty.
I have been looking at some of your example code and some code I've found on the net, but clearly I feel that I am missing some import areas.
I would look at using 'C' but this doesn't fit into my goal of learning Python and sticking to pure Python programming.
Any help would be appreciated.
Regards
Neal

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

Re: Guzunty Pi. New users start here.

Mon Jul 14, 2014 9:53 am

Hi Neal,

I'm a 'C' programmer and so the examples are in 'C', there isn't a complete set of Python examples at this time.

There is a Python library, and I did create a couple of Python examples so that you can see what you need to do for the other cores. The 16i8o and 16o8i cores have Python examples which are exact analogues of the C versions.

Porting is very straightforward. Hey, this sounds like an opportunity for you to learn some Python and contribute to the community site :-) This means you get to learn a bit about how git works too.
When you have an example to contribute, you just click the 'Submit pull request' button on GitHub and I'll pull your examples onto the site for others to use. I'll also be happy to look over your code and help you with any problems you encounter.

Alternatively, if there is a core you'd like to see converted let me know and I'll try to make some time to port it.

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

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

Re: Guzunty Pi. New users start here.

Mon Jul 14, 2014 9:56 am

For anyone who is interested, we're expecting Guzunty will be Pi Model B+ compatible.

We've ordered a board and will confirm this (tomorrow hopefully).

best,

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

jaybee007
Posts: 20
Joined: Thu May 29, 2014 8:49 pm

Re: Guzunty Pi. New users start here.

Mon Jul 14, 2014 7:59 pm

guzunty wrote:For anyone who is interested, we're expecting Guzunty will be Pi Model B+ compatible.

We've ordered a board and will confirm this (tomorrow hopefully).

best,

Derek
Hi Derek
That's good news as I have a few guzunty's and a couple of daughter board's. I have just also ordered a model B+ lol
On another note,I would like to know if I could repurpose the unused pins on the daughter board as the screen only uses 32 of the 40.
If they are accessible how hard would it be to add say push buttons ?
Or adding some analogue inputs ?
Thanks

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

Re: Guzunty Pi. New users start here.

Mon Jul 14, 2014 8:33 pm

Hi Jaybee,

Yes, it is possible to use the spare capacity of the CPLD in combination with the daughterboard. In fact, that is what P2 and P5 are for.

P2 carries the unused RPi signals and P5 the spare CPLD signals. Check out the daughterboard schematic here:

https://github.com/Guzunty/Pi/wiki/LCD- ... ghterboard

Analog inputs are possible, but without adding some codec hardware.

Hope that helps,

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

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

Re: Guzunty Pi. New users start here.

Mon Jul 14, 2014 8:33 pm

Hi Jaybee,

Yes, it is possible to use the spare capacity of the CPLD in combination with the daughterboard. In fact, that is what P2 and P5 are for.

P2 carries the unused RPi signals and P5 the spare CPLD signals. Check out the daughterboard schematic here:

https://github.com/Guzunty/Pi/wiki/LCD- ... ghterboard

Analog inputs are possible, but without adding some codec hardware.

Hope that helps,

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

jaybee007
Posts: 20
Joined: Thu May 29, 2014 8:49 pm

Re: Guzunty Pi. New users start here.

Tue Jul 15, 2014 12:42 pm

guzunty wrote:
Analog inputs are possible, but without adding some codec hardware.

Hope that helps,

Derek

Hi Derek ,
Thanks for the link, I didn't realise there were so many free gpios :P
Now about the analogue, I'm trying to add a XY joystick to my handheld pi.
So would I still need a analogue to digital converter to create inputs ?
Sorry if it seems like your spoon feeding me . I'm a noob lol
Thanks again

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

Re: Guzunty Pi. New users start here.

Tue Jul 15, 2014 1:02 pm

The PI doesn't have any native analog in's as far as I know (anyone listening please feel free to correct me) and the CPLD is strictly a digital peripheral.

It is possible to add an R2R resistor ladder with the spare CPLD lines if you were absolutely determined to use just the CPLD, but my understanding that its not very accurate. You would do better to add an SPI or I2C analog to digital device, or piggyback a analog card.

Another possibility is to interface an Arduino, something like a Nano. There is a 3.3v 8MHz device that would suffice for what you want, I think, or you could interface a faster 5v Arduino through the spare CPLD signals. They're pretty inexpensive. The ATMega in an Arduino has 5 analog inputs and you could use a serial link to get the data to the Pi. I've done this for one of my own projects.

HTH,

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

Return to “Other projects”