• Content Count

  • Joined

  • Last visited

About enriqeat

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, I get infinite loops when I enter a digit which is not expected from scanf function while programming a standalone application for the retired version of zybo. what I want is to enter just an integer. I used the next code to avoid entering something that is not an integer by accident, as an alternative for scanf. This works great on CodeBlocks, but when I try to use it on SDK it does not work, it's like I cannot enter anything. How can I solve this issue? should I use another function or library? #include <stdio.h> #include <stdlib.h> int main(void) { char *p, s[100]; int n; while(1) { while (fgets(s, sizeof(s), stdin)) { n = strtol(s, &p, 10); if (p == s || *p != '\n') { printf("Please enter an integer: "); } else break; printf("You entered: %d\n", n); } printf("the number is %d\n",n); } }
  2. JColvin, thank so much for your answer, and sorry for the picture, it was supposed to be the next one two leds, and 2 resistors.. and yes, I am working with the retired version of ZYBO, just want to connect this two circuits at a time and expect nothing to explode. xc6lx45, thank you too, I understand way better now why an output can have 2 directions for the current.
  3. Hi, I am working on Zybo and not entirely sure how the outputs will behave when 2 leds are connected as the figure shows. Pins JE1 and JE2 are configured as PWM outputs for the PL on the same port (JE single-ended standard Pmod port) and the VCC and GND pins shown in the figure are located on the same port as well. The usual thing to do is to supply energy to the external led as shown on the left of the figure, but can I connect a second led as shown on the right at the same time? I understand the if the pin is an output, then current should exit from it, but what happens when current enters? By the way.. I've tested both circuits independently (i'll wait an answer to connect both circuits at the same time) and they turn on the led with the respective duty cicle of each PWM, but still why does it work when a current enters the output pin?
  4. I see two COMs on device manager for my ZYBO SoC, this is a problem when I want to connect through SDK because it is supposed to have only one COM. Furthermore I have to say that this happens only on my new laptop which has vivado 2018 installed on it, when using my old laptop with vivado 2014 this is not a problem, I see just one COM, and the SDK software runs normally. I can program the bit file, but cannot connect using the SDK and even on laptops that do not have vivado installed, only one COM is shown. How can I fix this issue?