GPIO on USB microcontroller

Status
Not open for further replies.

Ashford

New Member
hey guys,
quick question I have a usb microcontroller chip that has various GPIO (General Purpose Input Output) pins and I'm wondering, how exactly are they used? Can I send an entire packet on the pin or can I only set one bit to it? And other thing how exactly do I get output from it? Any help will be greatly appreciated.

Thanks in advance.
 
Assuming it's a PIC?, you can set either complete ports or individual pins with a single instruction, many other processors require multple instructions to access single pins.
 
Thanks a lot for the help but how do chips like FTDI2232 or similar chips work, because i read somewhere that the FDTI chips don't need programming, so how does these chips handle there GPIO pins?
 
Thanks a lot for the help but how do chips like FTDI2232 or similar chips work, because i read somewhere that the FDTI chips don't need programming, so how does these chips handle there GPIO pins?

They don't, it's a hardware device, not a programmable one.
 
One more thing about the GPIO pins though, can i send an entire packet to it? I'm curious as to whether or not it can be used for bit-banging.
 
One more thing about the GPIO pins though, can i send an entire packet to it? I'm curious as to whether or not it can be used for bit-banging.
Goto to the FTDI site like Nigel said. Look at the appnotes for your particular device and bit bang mode. For the Ft232R that I have they had a programming utility called MProg that let you change the EEPROM, and configure the available DIO's to flash led's on TX, RX, power on etc. To read and write to the DIO's from the PC, look at the programming guide and examples, didn't get that far myself.
 
ok, I'm kinda new to USB microcontrollers and stuff, so what about a chip like the PL2303HX? I found the datasheets here

https://www.electro-tech-online.com/custompdfs/2010/06/PL2303.pdf

https://www.electro-tech-online.com/custompdfs/2010/06/an_PL2303_GPIO20LED20Indicator_v10.pdf

but I'm still not sure about the GPIO pins, in the second datasheet the program they used only set/read either an "on-state" or an "off-state" to and from the pins, but what I'm concerned with is using those pins for transferring/receiving entire packets of arbitrary data . So if you could decipher the datasheet for me and tell me if it's possible to transfer entire packets of arbitrary data I would really appreciate it
 
ok, I understand what your saying, but I really just want to know how those pins are used, as in if I can to send/receive packets from them or if they only support an "on-state" or "off-state"?
 
Well I'm not really trying to build anything, I'm just trying to learn about microcontrollers and stuff, so I'm reading about different chips as well as some tutorials but when I come across the USB controllers I keep encountering these GPIO pins and I just want to know EXACTLY what they are used for and whether they can transmit/receive packets.
 
I'd start with picking out a microcontroller like a PIC or AVR and reading up on their tutorials. Nigel has a great set of PIC tutorials on his site.
 
Well I guess, but the PIC and AVR are somewhat different from certain USB controllers, and all I really want to know is whether or not I can send entire packets of data (e.g. 0xFFFF) to the GPIO pins?
 
You can latch a single byte with the FT245R it works like a printer port. You might want to look at the Universal Bit Whacker instead.

so your using the GPIO pins of the FT245R to do this? And if so, could that be done with the GPIO pins of the PL2303HX or any other USB controller for that matter
 

So look at microcontrollers, and not USB converters - which 'may' use a microcontroller, but if so it's pre-programmed and not accessible.

Presumably the one you're looking at is a USB/Parallel converter, intended to feed a Centronics parallel printer.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…