• Content Count

  • Joined

  • Last visited

About fpga_babe

  • Rank

Profile Information

  • Gender
  • Interests
    FPGA, IP Development, RTL coding, Interface.
    Drinking beers

Recent Profile Visitors

71 profile views
  1. Thank you Jon. I will check it.
  2. About your code, thank you. I will check when i have time.
  3. Hi. I simple post the question about digilent hardware which i am working on. I stated it clearly above. They sale products, i bought it and used it. They have a forum and i can post a question. However, it is not mandatory to get an answer. That's it. Please dont go too far from technical problem on this forum.
  4. From below page: http://pcbheaven.com/wikipages/The_PS2_protocol/?p=1 It seem that PIC send the FF command to Keyboard by itself in some cases.
  5. Hi, My thought is that the question may related to the skew between signals in a bus. Sorry if I am out of the real issue from the first post. But we need him/her to confirm the issue more clearly. - What is the problem ? - output data is wrong ? - timing of signal are wrong ? ...
  6. HI, Thank you for your reply. In my case of my project, the key board keep sending automatically the self-test passed code "AA" after a short time that there is no case press. Things like this: - Reset FPGA - Press any key --> keycode return is "AA" - Press some more key ( not fixed number of keys) --> return correct Keycode of keyboard. I use Leds on Basys3 to display the keycode value. - Stop pressing key - Press any key again --> keycode return a "AA". I have a doubt that the PIC send the request to Keyboard to do self-test by itself. Is there anyone can confirm this point ? Also, would it be true if the PIC is waiting some command from the FPGA to comunicate with the Keyboard ?
  7. Hi, thanks for a reply. Let share the project and problem. We can learn from them.
  8. It appears to me that it is normal behavior with implementation design. In RTL simulation, there is no gate delay. All logic gate operate without any delay from its input to output ports. However, the delay is attached on simulation with delay on inplemetation design. That is why you can see that each bit of a bus signal will have different propagating time. It called "skew" sometimes in layout design. If there is no timing volation on your design, then there would be no problem with this.
  9. Hi all, I am new to FPGA and it is my hobbies. Most of my job is to design RTL IP and ASIC related work. Currently, I am investigating bus interface in general from UART, I2C, PS-2 to AXI, SPI and so on. My target is to build an IP set to adapt the peripheral using those Interface. Hope to see someone in the same interest.
  10. fpga_babe

    HID protocol on Basys3

    Hi, I am using Basys3 board and I want to write a RTL module in FPGA to get the character from USB Keyboard. From the Digilent reference of basys3, if the FPGA side only receive the data from Keyboard, then the PS_CLK and PS_DAT ports can be as input direction. My question is that, to receive the keycode from a keyboard, do we need to send configuration to Keyboard before hand ?
  11. Hi Jon, Thank you for your response. Before trying your reference design, I modifed my code below: [ORG] //2. Connect the handlers Status = XIntc_Connect(&Intc, GPIO0_INT_CHANNEL, (XInterruptHandler) &GPIO0_HANDLER, (void *) 0); [MOD] //2. Connect the handlers Status = XIntc_Connect(&Intc, GPIO0_INT_CHANNEL, (XInterruptHandler) GPIO0_HANDLER, (void *) 0); I could see the interrupt happened. I think the arrgument passed to the function is not correct. I will check your program as well.
  12. Hi, I am having a problem with GPIO interrtupt on Arty A7 board. + 2 GPIO with each of them is dual channel. + INTC instance to connect the interrtup with Microblaze. After I used below software, I can not see the interrupt. Would you please tell me how to debug in next step ? Sorry, I am new to SDK and Arty A7. I want to connect the switch or button as interrupt, and do some task inside a handler. I want to clarify below of my understanding, whether it is correct or not: 1. hardware: - Enable register access in INTC to make the software can access INTC registers. - Choose level (high) as interrupt type. - Fast interrupt is enable. 2. Software: #--------------------------------- /***************************** Include Files *********************************/ #include "xparameters.h" #include "xil_exception.h" #include "xintc.h" #include "xgpio.h" #include "xil_printf.h" #define UART_INT_CHANNEL 0 #define GPIO0_INT_CHANNEL 1 #define GPIO1_INT_CHANNEL 2 XGpio Gpio0; /* The Instance of the GPIO0 Driver */ XGpio Gpio1; /* The Instance of the GPIO1 Driver */ XIntc Intc; /* The Instance of the Interrupt Controller Driver */ void UART_HANDLER(void *Callbackref); void GPIO0_HANDLER(void *Callbackref); void GPIO1_HANDLER(void *Callbackref); void GPIO0_HANDLER(void *Callbackref) { xil_printf("Handler GPIO0 !! \r\n"); //write out GPIO0, LED 0101 XGpio_DiscreteWrite(&Gpio0, 1, 0x05); //Write out GPIO1, LED RGB XGpio_DiscreteWrite(&Gpio1, 1, 0xAA55); } // Main program int main(void) { // 0. Initial GPIO0 Status = XGpio_Initialize(&Gpio1, XPAR_GPIO_1_DEVICE_ID); if (Status != XST_SUCCESS) { return XST_FAILURE; } //Configure the IO direction for GPIO0 ( push button is in channel2): XGpio_SetDataDirection(&Gpio1, 1, 0x00000 ); XGpio_SetDataDirection(&Gpio1, 2, 0xFFFFF ); //1. Init the Interrupt controller Status = XIntc_Initialize(&Intc, 0); if (Status != XST_SUCCESS) { return XST_FAILURE; } //2. Connect the handlers Status = XIntc_Connect(&Intc, GPIO0_INT_CHANNEL, (XInterruptHandler) &GPIO0_HANDLER, (void *) 0); if (Status != XST_SUCCESS) { return XST_FAILURE; } //3. Enable the INTC XIntc_Enable(&Intc, GPIO0_INT_CHANNEL); XIntc_Enable(&Intc, GPIO1_INT_CHANNEL); //4. Start the INTC Status = XIntc_Start(&Intc, XIN_REAL_MODE); if (Status != XST_SUCCESS) { return XST_FAILURE; } //5. Enable interrupt for GPIO0 XGpio_InterruptEnable( &Gpio0, 0x0000); XGpio_InterruptGlobalEnable( &Gpio0 ); // 6. Initi the exception Xil_ExceptionInit(); // Xil_ExceptionRegisterHandler(1, (Xil_ExceptionHandler)GPIO0_HANDLER, 0); // // /* Enable non-critical exceptions */ Xil_ExceptionEnable(); xil_printf("Waiting for interrupt... !! \r\n"); while(1) { } //return return XST_SUCCESS; } //--------------------------------------------------------------------------------