Wicked Minds Electronics

Members
  • Content count

    50
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Wicked Minds Electronics

  1. Wicked Minds Electronics

    AVR8 Schematic

    I am new to FPGA but pretty experienced with AVR and digital logic in general. I am using WebPack ISE. I am still learning VHDL by use of schematics and seeing what it generates. What I am trying to do is create a project where my schematic is the "Top Module". How do I create a symbol for the AVR8 so that I use it in schematics? I have created symbols for other simple things and I did create a Papilio_AVR8 symbol but when added to a schematic in a new project throws a fit during synthesis with warnings and errors too cryptic for my current level of understanding. Basically the device I am interfacing Papilio to requires some I2C commands to be sent to initialize the device and enable it's outputs. I currently have an Arduino sketch that performs this function and also forwards I2C commands received via rxd/txd to the I2C bus using an UNO and want to just add the AVR core to my schematic so that I can init the external device and get data coming into the custom logic I have created. The perfect thing would be a symbol that obeys the options that determine which ports to include so that I can generate a symbol with only the AVR port pins needed for I2C. Thanks for any help you can provide. Great product by the way, I started learning FPGA about two weeks ago, got my Papilio from SparkFun and had a custom circuit running and providing expected output in a matter of a couple of hours.
  2. Wicked Minds Electronics

    Bare Bones I2C Master Writer

    My design only requires me to perform some I2C writes to initialize a couple of devices. After trying several different methods and being new to FPGA in general I found that this solution was even simpler than implementing PicoBlaze. Customizing To define the I2C writes performed look inside SimpleI2CCore.vhd where you will find an array called seq: constant seq: seqT:= ( -- RESET CAM (idle, x"00"), (start, x"00"), (const, TCM_DEV_ADDR & '0'), (const, TCM_REG_SLEEP), (const, TCM_SOFT_RESET), (stop, x"00"), . . . (start, x"00"), (const, VIDEO_ENCODER_ADDR & '0'), (const, VIDEO_CONTROL_5), (const, x"60"), (stop, x"00"), -- end (idle, x"00") ); Change the const values to the appropriate ones for your device(s). In the attached project there are several writes defined for two different devices, you can remove/add as many as you like just always ensure your last value is idle so that it releases the SCL and SDA lines. Also note the device address constants are 7 bits. Remember to modify the top boundary of the array here: type seqT is array(0 to 41) of i2cT; With a 24Mhz input clock, it produces a 100KHz I2C clock. The additional DCM in the attached project that provides 27MHz is only to drive the external I2C devices and can be removed or modified as needed. Live output from Papilio: Hopefully others will find this as useful as I did This post has been promoted to an article SimpleI2C.zip
  3. Wicked Minds Electronics

    Multi Color Object Tracking with Papilio and TCM8230

    Setup and tracking of multiple objects (Rubiks squares) of different colors using Papilio 500k and a camera from SparkFun. Image acquisition and segmentation are implemented in custom VHDL. Blob detection is limited to 8 objects and is very crude at this point because only a single pass algorithm has been implemented in assembly using a KCPSM3 running at 64MHz. The client application shown here is written in C#. Only Wing C on Papilio is needed to interface the camera, the next step after adding a second and maybe third pass to blob detection is to throw some servos on the other side (Wings A, and see what that leads to. Still lots of room left! Logic Utilization Slice Flip Flops 423 of 9,312 (4%) 4 input LUTs 1,072 of 9,312 (11%) Occupied Slices 629 of 4,656 (13%) Slices containing only related logic 100% Number of Slices containing unrelated logic 0% Total Number of 4 input LUTs 1,128 of 9,312 (12%) Number used as logic 740 Number used as a route-thru 56 Number used for Dual Port RAMs 272 Number used for 32x1 RAMs 52 Number used as Shift registers 8 This post has been promoted to an article
  4. Wicked Minds Electronics

    Bare Bones I2C Master Writer

    click here for the Original forum thread My design only requires me to perform some I2C writes to initialize a couple of devices. After trying several different methods and being new to FPGA in general I found that this solution was even simpler than implementing PicoBlaze. Customizing To define the I2C writes performed look inside SimpleI2CCore.vhd where you will find an array called seq: constant seq: seqT:= ( -- RESET CAM (idle, x"00"), (start, x"00"), (const, TCM_DEV_ADDR & '0'), (const, TCM_REG_SLEEP), (const, TCM_SOFT_RESET), (stop, x"00"), . . . (start, x"00"), (const, VIDEO_ENCODER_ADDR & '0'), (const, VIDEO_CONTROL_5), (const, x"60"), (stop, x"00"), -- end (idle, x"00") ); Change the const values to the appropriate ones for your device(s). In the attached project there are several writes defined for two different devices, you can remove/add as many as you like just always ensure your last value is idle so that it releases the SCL and SDA lines. Also note the device address constants are 7 bits. Remember to modify the top boundary of the array here: type seqT is array(0 to 41) of i2cT; With a 24Mhz input clock, it produces a 100KHz I2C clock. The additional DCM in the attached project that provides 27MHz is only to drive the external I2C devices and can be removed or modified as needed. Live output from Papilio: Hopefully others will find this as useful as I did Source Code: SimpleI2C.zip
  5. Wicked Minds Electronics

    Multi Color Object Tracking with Papilio and TCM8230

    My youngest volunteered to model for a raw image test
  6. Wicked Minds Electronics

    Multi Color Object Tracking with Papilio and TCM8230

    So here it is assembled by hand using the new socket design. Just finished running tests on it and taking pictures. Works flawlessly This time around I chose female headers as connectors so that I have more mounting flexibility and can more readily use some ribbon cable to mount the camera on a servo assembly. P.S. As you can see from the close-ups, I couldn't find my tweezers for the caps and such
  7. Wicked Minds Electronics

    Multi Color Object Tracking with Papilio and TCM8230

    Thank goodness the drill file was correct! I'm so happy to see the holes where they belong It looks awesome! Can't wait to see one assembled.
  8. Wicked Minds Electronics

    Video Encoder Wing

    View the Full Thread with more information about the Wing. Awhile back I was playing with a CS4954 Video Encoder. It's a great little chip, inexpensive, supports NTSC/PAL, S-Video, SCART, etc via 6 on board 10-bit DACs. Here is my NTSC/PAL breakout board: It runs off 5V or 3.3v and requires a 27MHz clock. The interface is via 8bit parallel bus or I2C. If you use I2C, the 8 bit parallel I/O bus becomes an 8 bit GPIO! The pixel data is fed to it via a dedicated 8 bit bus. Using I2C you basically get these I/O lines back with the GPIO. It supports both Master mode where it will supply the vertical and horizontal syncs or Slave where those signals are provided by the host device. I have seen some cool things done with this chip in the 6502.org forums with FPGAs and was curious if anyone would like to help me get some VHDL going on Papilio for this thing. I have the i2c start up sequences to get output running and have drawn some simple patterns with it using an Arduino, but that's about it.
  9. Wicked Minds Electronics

    Video Encoder Wing

    Here are some snaphots of the wing displaying data from the camera (center) and Closed Caption text. For default register settings the color looks great Since the cs4954 provides a Frame signal I am able to interlace the image from the camera and not just doube the scan lines which keeps things at the right ratio. The garbage on the left is a display of internal color map data for debugging.
  10. Wicked Minds Electronics

    Video Encoder Wing

    Awhile back I was playing with a CS4954 Video Encoder. It's a great little chip, inexpensive, supports NTSC/PAL, S-Video, SCART, etc via 6 on board 10-bit DACs. Here is my NTSC/PAL breakout board: It runs off 5V or 3.3v and requires a 27MHz clock. The interface is via 8bit parallel bus or I2C. If you use I2C, the 8 bit parallel I/O bus becomes an 8 bit GPIO! The pixel data is fed to it via a dedicated 8 bit bus. Using I2C you basically get these I/O lines back with the GPIO. It supports both Master mode where it will supply the vertical and horizontal syncs or Slave where those signals are provided by the host device. I have seen some cool things done with this chip in the 6502.org forums with FPGAs and was curious if anyone would like to help me get some VHDL going on Papilio for this thing. I have the i2c start up sequences to get output running and have drawn some simple patterns with it using an Arduino, but that's about it. This post has been promoted to an article
  11. Wicked Minds Electronics

    Video Encoder Wing

    Here is the schematics for it
  12. Wicked Minds Electronics

    Video Encoder Wing

    I went ahead and made a wing in my spare time and have been able to pipe the picture from the camera to the cs4954 and also used the closed caption I2C commands to overlay text! No char rom needed
  13. Wicked Minds Electronics

    Wearable FPGA - Kopin 320m CyberDisplay

    Four of these beauties just arrived and I'm very anxious to get them running with Papilio. They sure are tiny! The entire assembly including the black casing is smaller than my thumbnail. They are meant to be viewed at about an inch from your eye. From what I have read so far they were heavily used in camcorder viewfinders and the military picked them up for those cool one eye nightvision huds you see them with. Google is loaded with links to the datasheet. Digikey still carries the connector which also arrived, so I will be making a board soon. If anyone has experience with driving these or can help me decode the timing in the datasheet please chime in Also, there is a driver chip that used to go with it, http://cache.freescale.com/files/timing_interconnect_access/doc/data_sheet/MCVVQ111A.pdf?pspll=1. Has some more insight on the timing.
  14. Wicked Minds Electronics

    Wearable FPGA - Kopin 320m CyberDisplay

    Today I am super excited that the MCVVQ111AFB chips to drive the displays arrived today from China! The chip handles conversion of standard NTSC/PAL video into all the signals and voltages required to drive the display and has a seperate OSD input to overlay graphics onto the source video. I can't wait to get a wing worked up and start driving the OSD input with Papilio. Maybe use the TVWing as a video source... Lots of fun ahead!
  15. Wicked Minds Electronics

    Amount of DCMs

    Don't forget the phase shifted outputs I currently use a single DCM to drive: CLKX2 - 64MHz picoBlaze CLK0 - 32MHz pixel counter CLKDV2 - 16MHz Servo PWM CLKFX - 24MHz camera, uart, i2c Works like a charm Don't forget when using multiple DCMs to link their Locked/Reset I/Os with Inverters for stability.
  16. Wicked Minds Electronics

    Multi Color Object Tracking with Papilio and TCM8230

    Finally got another camera to put everything onto a wing and get the thing off my breadboard. So relieved the right angle connector worked out correctly!
  17. Wicked Minds Electronics

    TV output wing

    Here is a schematic for the original source code I created in ISE. I refactored out the RGB to YUV conversion and audio to clarify it more and prep it for use with my camera. Also, I modified it to run off a single DCM. 8MHz is created by using the CLKDV set to divide CLK by 4. Enabling CLKX2 on the same DCM gives us the 64MHz for the encoder logic and CLK0 provides the 32MHz for the audio. Thought you might wanna toss it on the playground as an illustration. Let me know and I can post the project with the schematic top and symbols for all the entities if anyone wants it.
  18. Wicked Minds Electronics

    TV output wing

    So I built an 8-bit version of the TV Wing this morning and after a day of sweating out some VHDL with the correct timing I was able to pipe live video from my tracking system to the TV Now I don't have to solve the bandwidth issues with trying to pipe live video over USB, I can just watch it on any TV or even transmit it to a remote monitor. If anyone is curious about why I changed the values of the DAC to 100/200ohms, I can post some details about that with the calculations I made vs the NTSC specs. Ben: Thanks for the write up and making the related info easy to find! Jack: Maybe the TV Wing could have a jumper to pipe bit 7 to the TV DAC vs the Audio Output so one could choose between full 8 bit color and mute or 7 bit color with audio. Not sure if this has value this early into playing with it but it's a thought.
  19. Wicked Minds Electronics

    Multi Color Object Tracking with Papilio and TCM8230

    I added a TV Wing to my design and here is the results of tracking with a live composite video monitor. I added some screenshots at the end of the video so that you can see what the picture looks like without the brightness being skewed by the angle I filmed the demo at. The TV Wing is based on the design by BenL posted on the GadgetFactory playground with slight modifications to bring the DAC up to 8 bit resolution and using 100ohm/200ohm values for R/R2. I had to add some VHDL to convert the cameras YUV422 data stream into the separate Y, U and V channels for encoding.
  20. Wicked Minds Electronics

    TV output wing

    Ben, I ran across this document a long time ago doing video with AVRs. I noticed that it uses the same hardware but I never got around to color so didn't read it in detail. Maybe it has some good information for you if you haven't seen it already. How to generate color in software using SX chips
  21. Wicked Minds Electronics

    TV output wing

    My application does not require Audio, Can the video ladder DAC be extended to 8 bits by just adding two more resistors?
  22. Wicked Minds Electronics

    Video Encoder Wing

    That does look fun to play with, it won't give me full color reproduction from the camera image but I can think of a lot of other things to try with it Think I might build one this weekend.
  23. Wicked Minds Electronics

    Multi Color Object Tracking with Papilio and TCM8230

    Not really, SparkFun has the datasheet for the camera. There are two ways to connect to it, there are pads on the bottom which are also broken out to tabs on the sides for a socket. You will have to look at the drawings in the datasheet, it is hard to describe the pattern.
  24. Wicked Minds Electronics

    Video Encoder Wing

    I'm sure a lot of the functionality could be, but you would still need the external 10 bit DACs and all the I/O that goes with them. For a $7 chip, I'm not sure what the advantage would be. I'm personally interested in it to do text and graphic OSD type things for video that will be transmitted with a cheap NTSC/PAL transmitter. Thought it might also be useful for the retro computer projects as well.
  25. Wicked Minds Electronics

    Multi Color Object Tracking with Papilio and TCM8230

    Finally found models for the connectors