Search found 8 matches

by mehdi
December 17th, 2015, 2:22 pm
Forum: General
Topic: Connecting SPI Devices to MOJO (NRF24l01)
Replies: 1
Views: 2626

Connecting SPI Devices to MOJO (NRF24l01)

Suppose that I want to use NRF24l01 https://www.sparkfun.com/products/691 with mojo, is it possible? Cause as far as I know the SPI port of the FPGA is used for AVR connection. I've got totally confused about it, I searched through the net for SPI connection but there is nothing useful can be found ...
by mehdi
November 11th, 2015, 11:58 am
Forum: General
Topic: PWM Tutorial Frequency
Replies: 11
Views: 11184

Re: PWM Tutorial Frequency

embmicro wrote:The reason your duty cycles are so small is because you are comparing your value to the entire value of your counter. You need to instead compare it only to the 8MSBs.
just a question, I wonder what does the minus after 15 means in this line of code?

Code: Select all

ctr_q[15-:CTR_LEN]
by mehdi
November 11th, 2015, 5:36 am
Forum: General
Topic: Visual Basic and MOJO V3
Replies: 0
Views: 8708

Visual Basic and MOJO V3

As I can successfully run a PWM with variable frequency regarding ADC value in ISE (https://embeddedmicro.com/forum/viewtopic.php?f=2&t=35), Now I decide to send the value using VB instead of ADC. I will share my tries here.
by mehdi
November 11th, 2015, 5:19 am
Forum: General
Topic: MPU9250 with MOJO V3
Replies: 1
Views: 3508

MPU9250 with MOJO V3

MPU9250 (9-Axis Gyro+Accel+Magn) is a fantastic device that can use in many projects, I am trying to drive it using my favorite FPGA board MOJO. Hope this can be useful for others.

here the basic info about it http://store.invensense.com/ProductDeta ... nc/487537/
by mehdi
November 11th, 2015, 5:11 am
Forum: General
Topic: PWM Tutorial Frequency
Replies: 11
Views: 11184

Re: PWM Tutorial Frequency

The reason your duty cycles are so small is because you are comparing your value to the entire value of your counter. You need to instead compare it only to the 8MSBs. module pwm #(parameter CTR_LEN = 8) ( input clk, input rst, input [CTR_LEN - 1 : 0] compare, output pwm ); reg pwm_d, pwm_q; reg [1...
by mehdi
November 10th, 2015, 6:08 pm
Forum: General
Topic: PWM Tutorial Frequency
Replies: 11
Views: 11184

Re: PWM Tutorial Frequency

I solve the problem by adding a counter to my code :D , here is the code module pwm #(parameter CTR_LEN = 8) ( input clk, input rst, input [CTR_LEN - 1 : 0] compare, //input [7:0] ctr_q, output pwm ); reg[28:0] ctr_d, ctr_q; reg pwm_d, pwm_q; reg [7:0] value; assign pwm = pwm_q; always @(*) begin if...
by mehdi
November 9th, 2015, 5:03 pm
Forum: General
Topic: PWM Tutorial Frequency
Replies: 11
Views: 11184

Re: PWM Tutorial Frequency

Well for roughly 600hz you'll need a counter 17 bits wide (50MHz / 600Hz ~ 83333, ceiling log2(83333) = 17). Note that 17 bits will actually get you around 381Hz and if you want a more exact value, you have to use a non-power of two overflow value. You can then simply take the 8 MSB of that counter...
by mehdi
November 9th, 2015, 5:31 am
Forum: General
Topic: PWM Tutorial Frequency
Replies: 11
Views: 11184

Re: PWM Tutorial Frequency

If you use a DCM in your design I recommend just using the synthesized frequency for your entire design (say if you want the Mojo to run at 100MHz instead of 50). It can get very messy having multiple clock domains (different frequencies) in your design and it should be avoided if possible. If I un...