Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Qt Serialport to CDC Pinguino
01-04-2015, 09:53 PM, (This post was last modified: 01-04-2015, 09:54 PM by onimusha.)
RE: Qt Serialport to CDC Pinguino
(01-04-2015, 06:45 PM)joel Wrote: Hi,
Actually looks like the same problem i had with pinguino CDC and Visual Basic application (W7 64 bits)
All is working fine with hyperterminal, Teraterm, minicom or whatever, but as soon as i wanted to communicate with the pinguino through CDC with a more "elaborated" application (win app), it failed.
Don't know, however, if it is related to the windows CDC driver (virtual com port) or to the PIC side or other thing.
I did not tested application under linux, but it may be interesting to see if it's coming from a "bad" implementation on the PC driver or on the PIC code


simply put  that's the problem here, i think pinguino comunity need this. PC apps + pinguino boards, just think about it!
acta non verba
01-04-2015, 10:29 PM,
RE: Qt Serialport to CDC Pinguino
(01-04-2015, 06:56 PM)gtcbreizh Wrote: Hello Joel,
With Python we can communicate between PC and Pinguino boards using a virtual CDC port. See Yeison's pages.

Yes i know Python is working flawlessly (at least with the basic tests i made) with CDC, but there is some issues with, at least, visual basic, which i have not been able to solve ( well, i solved my issue by using "standard" serial link from the pinguino and a FT232 chip or a BT link, which is working ok).

Onimusha, i do not understand your request ? Do you want to use Serial "over USB" (which CDC is actually) or a standard serial link (using TX and RX pins of the pinguino?)
If you want to use CDC virtual port, you need to install the win drivers for that (this is documented on the wiki page
If you want to use the "classical" serial link, you need a PC with a serial port (or with a RS232-USB converter...)
and there is some examples of serial link in the example directory
01-04-2015, 10:48 PM,
RE: Qt Serialport to CDC Pinguino
joel i'm talking about the mchpcdc.inf driver, i had to install that to be able to see my pinguno as a com port on mi pc under windows7 32 bit. that's if i'm using a cdc class on mi pinguino board, in the other hand if i use a serial class, the board aint showing up as a com port or anything. So i must understand that the serial class in pinguino is only for traditional interface (RS232) on the pins?
acta non verba
02-04-2015, 10:39 AM,
RE: Qt Serialport to CDC Pinguino
Actually, on the pinguino side there is what you call the CDC class, which is related to Serial over USB and the Serial Class, which is using the standard interface (TX and RX pins). So it is normal, if you use the serial class, that the com port do not show up through CDC..
This information is available on the wiki page..( and on the title (one talk about CDC, virtual com port, usb, the other talk about internal UART, and if you click for example on Serial.begin, it is very explicit, (talk about serial port, TX and RX pins numbers,and so on)
May be reading a bit the information on the wiki page would have avoided misunderstanding ..
02-04-2015, 03:50 PM, (This post was last modified: 02-04-2015, 05:04 PM by gtcbreizh.)
RE: Qt Serialport to CDC Pinguino
I would like to reinforce Joel's last explanations about Serial and CDC.
When you work with an Arduino your PC is connected to the board with an USB cable but don't forget the data arrive to or start from the UART module found inside the Atmega chip (the RX/TX pins) because the USB communication is converted by a FTDI chip according the RS232 protocol. Therefore the Arduino library is a pure UART library.

With the Pinguino system you have at least two ways to communicate between PC and microcontroller.
1) you link the two with a RS232 cable if your PC is equipped with a classic serial adaptor (subd-9 for instance) or with a TTL/USB converting adaptor/cable. Anyway the data is going thru the UART module built inside the microcontroller,
  and you use the Pinguino Serial library. Side PC, your code can use a Serial Class.

2) you prefer a pure USB solution with a classic USB cable to link PC and the PIC board. There there is no FTDI (or equivalent) chip to convert the PC data according the UART protocol. Then the data is processed by both the hardware and the software.
Now the PIC software can be designed according two USB protocol :
- a true one, covered by the Pinguino USB/BULK library
- a "virtual" one, covered by the Pinguino CDC library. When the board is loaded by these specific functions it is seen by the PC as a COM port. But side PC a Serial Class (UART typ) is no more suitable.

I propose you to make a test replacing in your pde code CDC by Serial but furthemore you have to use  a converter cable (5V TTL->USB)  instead a classic USB cable.
Here is your code lightly modified to fulfill to syntax.
I tested it with the Qt terminal app found in the examples Qt5 and it worked (see the attached image).

char dato;  

#define led 7 
void setup(){  
    pinMode(led, OUTPUT);  
void loop() {
    dato =;  
    Serial.printf("Caracter Recibido! \r\n");
    if(dato == 49){ 
        Serial.printf("Led Encendido \r\n");  
    }else if(dato == 50){  
        Serial.printf("Led Apagado \r\n");  

I think from this you can create what you wish.


Attached Files Thumbnail(s)
04-04-2015, 07:15 AM,
RE: Qt Serialport to CDC Pinguino
working on it guys, i'm trying to get the cable
acta non verba

Forum Jump:

Users browsing this thread: 1 Guest(s)