Hello, First, I apologize for the bad English , I'm using a translator atomatico . I started using the card - SAM3U -EK Atmel to generate a square wave and two continuous signals , commanding the PC via serial communication from the start and stop signals . I managed to do it fairly easily thanks to the software example that I found on the Internet . I then connected the PC to the UART port of the card. I generated the square wave output PA7 , while the two continuous signals have them generated as square wave duty cycle 100 , the outputs PA8 and PA9 . Now I would have the need to acquire a square wave of predetermined frequency , and calculate the duty cycle of the same . The duty cycle value must then send to the PC , and I thought to do it using the other serial port on the card ( USART ) or via the USB port. Do you have any advice? Do you have any sample program that I can be of help ? All this and ' part of a project , just born , for industrial simulation . Thank you very much , kind regards Alessandro Parodi
OK - if two "PC" are going to interface to the same board, then it's best with two interfaces (unless you use Ethernet).
Best would probably be to use USB and have the board emulate a standard serial port. Real RS-232 is a dying standard.
I believe that I will do so. Do you know if there is some sample software is to use the USB port of my card, both for the acuisizione signal. From what I can pick up the input square wave and then calculate the duty cycle?
Thanks again, greetings ale
Sorry - I don't work with your processor. But look for capture support. Lots of processors can use the timers to measure time using capture functionality where the hardware samples the timer ticks when a processor pin toggles.