• Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by JColvin

  1. JColvin

    Basys �

    Hi ricardo_lara_gomez, The truthful answer is that there is no "easy" way to count the number of turns accurately on a DC motor because they are not designed to be able to purposefully rotate a specific amount. That being said, what I would consider the easiest would be to determine the approximate maximum rotation speed at its rated voltage from the motors datasheet. After we know that value, we can then calculate the mid-range speeds from pwm pulses of that same rated voltage. For example, if a motor had a rated rotation speed of 125 rpm at 5V, then we could say that if we supplied a 5V pwm signal at a 50% duty cycle (on for half of the time and off for half of the time), this would effectively give us 50% of the rotation speed (62.5 rpm). We could then use a timer of some sort to measure how long we sent the pwm signal to the DC motor. So, if we took our same 5V motor and gave it a 50% duty cycle pwm signal for 24 seconds, we can calculate how many rotations our might have taken. What we would need to do is take the full 125 rpm times the 50% duty cycle times the amount of time we spent driving the signal. 125 rpm * 50% duty cycle * 40% minutes = 25 rotations As nice as this looks though, this equation is not guaranteed to be accurate. If we have any sort of load on the motor (like having the motor act as a shaft to move a robot) or from the fact that not all motors are exactly the same or from the fact that the motor will not instantly stop spinning the moment the pwm signal is stopped, the amount of full turns our motor actually took may be different than what we calculated. However, the equation we made will give you a good estimate of the total number of turns. Let me know if you have any more questions. Thanks, JColvin
  2. Hi bellizima, What do you mean by "images"? Do you mean the pictures in the document? Or the bootloader image? In case you are referring the bootloader images, those are at the bottom of their respective chipKIT product pages on the Digilent website. They will be the documents with a light blue box with a "Fw" in them. Let me know if you have any more questions, Thanks, JColvin
  3. Hi timothyheider, What it sounds like to me is that you have the program loaded onto the CellularRAM on the Nexys 3 which is volatile meaning it will lose any information that it had stored when the board is turned off (or power cycled). What you would need to do if you wanted to keep the program on the board is upload it onto the flash memory onto the Nexys 3, which is non-volatile so it will retain the program stored on there (more or less) indefinitely until you purposefully erase or overwrite it. Unfortunately, I am unfamiliar with FPGA's, so I cannot offer any guidance on how you would write your program to the flash memory as opposed to the CellularRAM. Please let me know if you have any more questions. Thanks, JColvin
  4. JColvin

    Basys �

    Hi ricardo_lara_gomez, Counting the number of complete turns a motor takes will depend on what you have available to you and your application, so I'll need to know a few more things before I can effectively help you. What kind of motor are you using? A DC motor, servo motor, or a stepper motor? Are you using the motor to go both forwards and backwards? Are you wanting the motor to just go at full speed or a variable speeds? Thanks, JColvin
  5. JColvin

    Pmod Ad5

    The bit stream that hamster has provided is exactly what you would want to provide when you want to have the AD5 use a pseudo differential input with pin "A0" on the 6x2 header on the Pmod. When using the pseudo differential input though, you will also need to provide a a voltage reference on the pin "ACOM" on the 6x2 header on the Pmod. Because the Analog Devices chip on the Pmod is by default operating in bipolar mode, and with a gain of 1 as we have configured the Pmod, I would recommend using a voltage reference of 2.5V. As per the "Data Output coding" section on page 33 of the reference manual, bipolar mode will actually only convert the analog signal into 23 bits with the 24th bit (the first one in the string of bits in the acting as the sign bit. This sign bit will indicate if the analog signal you are sending the AD5 is above or below the ACOM reference voltage. It is fairly easy to enable other analog input channels by turning on their bits (such as CH1, CH2, etc in the Configurations register on page 27), but as Mike mentioned, the design can get more complicated as we start needing to read from multiple registers like the Data register and the Status register in order to tell us which channel the information in the Data Register applies to. Let me know if you have any more questions. Thanks, JColvin
  6. These 12 bits most accurately represent the wave amplitude. However, it does not represent the entire wave; just a single part of the wave in a particular point in time. More precisely, the 12 bits that the PmodMIC sends to the system board via SPI represent how much of a full scale signal the system board is receiving. In decimal notation, 12 bits is equivalent to 4096 individual steps. So, if you were operating the PmodMIC at 3.3V, the 12 bits that you would receive would represent what fraction of 3.3V that the microphone is sending out at one particular point in time. Let me know if you have any more questions. Thanks, JColvin
  7. JColvin

    Pmod Ad5

    Hi 1116345, Hamster has given a great explanation (as he always does) on how to get the code for your FPGA up and running, but there are a couple more external hardware things that you'll need to do. The PmodAD5 uses Analog Devices AD7193 to do all of the analog-to-digital conversion. However, this particular chip only takes analog inputs as a differential pair. By default, it expects that you would be pairing AIN1 (A1 on the 6x2 female header) with AIN2 (A2 on the 6x2 female header). It also expects that you supply a reference voltage on the AVDD pin (something between 3V and 5.25V) and a ground reference voltage on the ground pin (0V) that are on header J4. Since you are using a light sensor, you will likely want to change the gain from the default of 128 to a gain of 1 in order to allow your analog input to have a wider range with respect to the analog voltage reference. To do this, you would need to write to the last three bits in the configuration register (pg 27) to 000 in order to have a gain of 1. If your reference voltage (AVDD on header J4) is 5V, this will allow you to have an maximum input voltage of up to 3.75V (from page 32 under Programmable Gain Array). Please let me know if you have any more questions. Thanks, JColvin
  8. JColvin

    Pmod Ad5

    Hi, There are a few things that could potentially be the source of your problem, but I'm not sure quite yet what they might be. So, I have three questions. Did you change/write to any of the registers of the Analog Devices ADC that is on the Pmod? Did you use any external reference voltage? Is it just a single analog signal that you are measuring? Thanks, JColvin
  9. Hi omarniopequeno, I personally don't know how you might implement the module in Verilog (I'm a microcontroller guy), but I do know what the 12 output bits mean. The 12 output bits are what the analog-to-digital converter that is present on the PmodMIC send out which represent the data (sound) that was picked up by the microphone in a particular instance of time. Practically speaking, when the MIC picks up some sound, the sound waves activate a component in the microphone which produces a voltage (analog) signal. This voltage signal is then sent to the analog-to-digital converter that is also on the Pmod, which converts the analog signal into a digital signal, in this case 12 digital signals. Since digital signals are simply just high and low voltages, digital signals can be effectively interpreted as a binary code with a high voltage represented as a '1' and a low voltage representing a '0'. The PmodMIC allows these 12 bits to become available to you (the user/ the basys2 in this case) through SPI (serial peripheral interface) with the most significant bit (the largest binary value) becoming available to you first out of the 12 bits of information. However, because of the nature of SPI, the PmodMIC will actually send you four '0' (low voltage) values first before sending the 12 bits of information through SPI. Please let me know if you have any more questions. Thanks, JColvin
  10. Hi Jordi, That's alright, we all make mistakes sometimes. I am by no means an FPGA expert, so I'll need sbobrowicz to confirm my answer but here is my understanding: After checking out the reference manual for the JTAG-HS3, I believe the reason that this is a pure 14 pin cable is so that the Zynq-7000 chip on ZYBO boards is able to be programmed correctly since that pin (pin 14) needs to be connected to pin 14 of the JTAG header and driven low at the appropriate times. Because the header is a 2x7, the 1x6 connector naturally cannot connect to all 7 pins simultaneously so the board is programmed correctly. That being said, if you are programming a different board that only requires the 6 pins, I would think that in theory you could individually route the signals from the HS3 to the 6-pin MTE connector with wires, although I don't know how this would affect the programming since it's hard to guarentee the wires are the same impedance so that signals pass through at the correct times and whatnot. The main issue, at least from my point of view, is that the pins on the HS3 and a 6-pin compatible cable (like the JTAG-HS1) are not in the same physical location, so you would not be able to plug in the 6-pin MTE connector straight into the HS3 and have it work correctly. Again, you maybe could route the wires individually, but that might result in some iffy programming; I have never personally tried this. Either way, the 14-pin connector is recommend simply because it brings all the signals of the HS3 to the correct pins on the FPGA without any issue or user re-routing. Let me know if you have any more questions. (and correct me if this is not accurate sbobrowicz) Thanks, JColvin
  11. As an additional side note, if you want to use the PmodI2S, you will need to use one of the newer FPGAs as opposed to a chipKIT board. Most of the chipKIT boards, aside from the chipKIT WiFire, are only able to run at 80 MHz which is unfortunately simply not fast enough to generate the master clock signal that the PmodI2S requires in addition to performing other actions (such as sending audio data). In terms of numbers, for those who are interested, the reason for this is because the slowest master clock signal that the PmodI2S can receive (according to the on-board chips datasheet here) is 8.192 MHz, which is equivalent to about 122 ns between clock edges. On the chipKIT boards, with a processor clock rate of 80 MHz, they are are only able to utilize their timer register clock for core services for half the time (40 MHz). This is a difference of 25 ns between clock edges, implying that every 5 clock "ticks" the master clock signal for the PmodIS will need to be triggered. Unfortunately, switching the voltage state of the digital pin driving the master clock and running a counter to keep track of the other needed clocks (such as the LRCK) takes more than 5 clock cycles to complete. This means that once the processor enters an interrupt service routine to "tick" the master clock and increase the counter of the other clocks, it will essentially never leave the ISR since more than 5 clock cycles passed while performing the functions within the ISR.
  12. Thank you for sharing your solution!
  13. Hi Jordi, I believe that particular statement is for the Xilinx 2x7 connector which is for the JTAG-HS3. What they are referring to is the JTAG3, which actually a different product, although I agree that it is a confusingly similar name; it took me awhile to notice the difference. You can see it at the bottom of the programming solutions product page here: http://www.digilentinc.com/Products/Catalog.cfm?NavPath=2,395&Cat=5#JTAG3 Let me know if you have any more questions. Thanks, JColvin
  14. JColvin

    Analog Shield

    Strictly speaking and for practical purposes, it is not compatible with the Arduino Mega. It was designed for the Arduino Uno and the chipKIT Uno32, so while the shield would be able to physically connect to the Mega, signals that the IC's present on the Analog Shield are expecting to receive are mapped to different pins than what the shield would actually connect to. Let me know if you have any more questions. JColvin
  15. Hi, I am personally not familiar with Linux so I do not know if this is the best answer to your question, but one of the other users on the Digilent Forum explained how they were successfully able to run Waveforms on the Linux machine. You can check out the forum thread ).
  16. Hi, The WS2812 LED Strips were not made directly by Digilent from the ground up (so-to-speak) so we not developed a nice Digilent documentation for it as of yet. However, we have made links on the product page to two different Instructables that explain how you would get the LED Strips up and running on either a chipKIT uC32 or Uno32 ( well as the chipKIT WF32 or Max32 (http://www.instructables.com/id/Getting-Started-with-WS2812-LEDs-with-Digilent-chi/). Additionally, you can check out our blog post on the WS2812's (https://blog.digilentinc.com/index.php/new-product-ws2812b/), which explains how to recognize which LED Strip you have, how to power the LEDs, and communicating with LEDs. On the blog post we also recommend two more tutorials on running these LEDs by Phillip Burgess from Adafruit and from arcobotic on Instructables. Please let us know if you have any more questions.
  17. Hi ulvarg, I am personally not very familiar with FPGAs, but I will do my best to respond to your question. Naturally, I do not know you your current familiarity with FPGA's, so it is somewhat difficult for me to appropriately address your question within a single response. However, I do have two recommendations to help you get started. My first recommendation, which I strongly suggest, is checking out Digilent's learn site. Digilent offers free Learn Modules to help users, such as you and I, get started with projects using Digilent products, such as the Nexys 4. These are available at learn.digilentinc.com with a full list of projects that are currently available here. Within that list, you can click on the "Digital/FPGA" tab to view all the projects related to FPGA's ranging from just getting started with FPGAs to creating your own state machine. Also, one of our forum members has shown another user how they might get a DC motor started using a Basys 2 board. Granted, this is not a Basys 3 or a Nexys 4 board, but the implementation concepts for an FPGA will be similar. You can view the post
  18. From my understanding, that will work just fine to program the boards separately and connect them together later so that they can communicate. Please let me know if you have any more questions. Thanks, JColvin
  19. Hi kpparr, If you are only communicating between the Pmod headers, you should be able to power each of your boards from their own USB connector and attach them both to the same PC. As long as your boards aren't drawing a ton of current (which from your description sounds like you won't even be coming close to limit), this should not be an issue. I have done a similar project with two Digilent microcontrollers and powered them both from my laptop without any problems. Alternatively, you could program one (or both) of your FPGAs to ROM and use an external wall power supply to power your boards. However, I would not recommend trying to power one board off of the other board. I think going from J5 to J5 would result in too much of a voltage drop to successfully power both boards if you are powering the first board from a USB port. It may work if you were instead using an external power supply, but I would personally power the boards separately. I believe the Pmod Vcc is only able to output at 3.3V, so that is not within the required input voltage range of 4.5 - 5.5V (ideally 5.0V) that a Basys 2 board needs to operate. So in the end, I recommend powering the two boards separately. Let me know if you have any questions. Thanks, JColvin
  20. Hi Alex, The technical reference manual for the Analog Discovery, which lists the tolerance for its various pins, can be found on it's product page here (http://www.digilentinc.com/Data/Products/ANALOG-DISCOVERY/Discovery_TRM_RevB_1.pdf). Alternatively, they also check out the most up to date reference manual on the Digilent Wiki here (https://reference.digilentinc.com/analog_discovery:refmanual) Let me know if you have any more questions.
  21. Hi jpcastellino, Actually, the part that you're looking for is the TEMT6000X01 by Vishay Semiconductor. Unfortunately, this is not listed on the schematic, but we will be sure to include it in our reference manual on our Wiki site for the PmodALS. Thanks, JColvin
  22. Yes, but I think only the original poster, in this Alex, can mark this as solved.
  23. To get the Uno32 Pmod Shield to work you need to do the following: Make sure that in your main MPIDE folder where you originally installed MPIDE under the hardware/pic32/variants folder, you have the Uno32_Pmod_Shield with the C and H files (these are likely there already). If you do, (or do not have them), go to the product page for the Uno32 Pmod Shield, and download the board variants file available. If you did not have the C and H files, copy the "Uno32_Pmod_Shield" folder that you see from the download and paste it into the hardware/pic32/varients folder. Then, from the download, open up the readme text file. In the readme you will see a section that says: Copy this whole section and go to the boards.txt file that is available in the hardware/pic32 folder. Go to the bottom of that text file and copy this whole section in. Then, we need to make the following changes: The first is merely for convenience: underneath the top line of the section that we just copied into the text file which says type in the following: What this does is add the "chipKIT Uno32 with Pmod Shield" option into the chipKIT section when choosing your board in MPIDE. Next, and what makes all the difference, find the line (about 7 lines down) that says: Change this line to instead say: What this does is tell MPIDE to look for a linker script file that actually exists. Now, save this boards.txt file and close out any MPIDE program that you already have running. When you reopen MPIDE, you should see chipKIT Uno32 with Pmod Shield as a board option under chipKIT and the program which uses the Pmod Shield should now successfully compile, and more importantly, successfully run with demo code that uses any of the headers on the Pmod Shield. Please let me know if you have any questions.
  24. Hi, I was attempting to use the PmodOLED and was attempting to get it's demo code correctly. The demo code claimed you can use the Pmod Shield header JC, but it did not seem to be working. So, I did a bit of research and found out what the problem was and successfully found a way to fix it and have the Pmod Shield work. Check out my answer below for what you need to do.
  25. Hmm... they all seem to be working on my end (11/6/14, 10:20 a.m PST). I'm guessing it was only a temporary problem, unless you are still encountering difficulties.