Electronics > Beginners
USB-UART bridge IC - powering VDDIO when VDD unpowered
<< < (4/4)
HwAoRrDk:
I finally got a board designed, made and assembled with the Holtek chip, as well as a pair of 74LVC1T45s as discussed. It seems to work well, but there is one annoying problem: I cannot program my microcontroller while the USB is attached! :'(

It's not the end of the world, but it's mightily inconvenient to have to un-plug and re-plug the USB cable every time I want to program the MCU.

I think I might know what the issue is, but I thought I'd check back here to see if others agree.

The microcontroller I'm using is an ATmega32M1, and the UART TX and RX pins on that are unfortunately shared with the MOSI and SCK pins for serial programming. Previously, on other projects that I've used the ATmegaXXM1 series on, when using an external UART-USB adapter, it's not been an issue, as all it meant was that a bunch of garbage got spewed across the serial terminal every time the microcontroller was programmed.

However, now with the Holtek USB interface, I think that things are not working for the following reason:

- The Holtek chip has an internal pull-up on its TX pin.
- The 74LVC1T45 transceiver on that line, as there is continuous power on both VCCA and VCCB, carries on replicating the signal from B to A.
- The A output is connected to the MCU's RX/SCK pin, and is actively being driven high.
- Because of this, during programming, my AVR-ISP MkII cannot apply a proper clock signal, so programming fails.

Is that likely to be the problem?

Any ideas on what can I do to resolve this? I have one idea myself, but it will involve tweaking the design and probably not do-able by bodging the current board.

I am currently running both 74LVC1T45s with the DIR pin grounded, so that signal goes from B to A. I could change the one that's on the SCK/RX pin to the opposite polarity (A to B) and connect its DIR pin to the MCU's reset line (where I have a discrete pull-up resistor), so it is normally pulled high. Then, during programming, while the reset line is pulled low for the duration of operations, the polarity of the 74LVC1T45 will be reversed (now B to A) and the SCK signal will be fed to the Holtek's TX pin, hopefully without issue.

Or am I over-thinking this and I just need to do something simple like add a series resistor to the MCU-side RX/SCK and TX/MOSI lines?
Ian.M:
Contention with the strong drive from a '1T45 in output mode would *NOT* be good for the Holtek TX pin.

Personally, rather than increase the complexity and respin the board, I'd live  with the need to disconnect USB before doing AVR ISP, and put a bootloader on the MCU so I could flash it over the UART with a simple button to ground /RESET plugged into the ISP header to trigger bootloader entry.   If that doesn't fit your workflow, I'd suggest getting a USB switch, so you can connect/disconnect it at the push of a button.

The only reason to add the resistors is if you need to make it as idiot-proof as possible because you anticipate all the lUsers out there needing to program your board by AVR ISP.
HwAoRrDk:

--- Quote from: Ian.M on December 06, 2018, 04:53:20 am ---Contention with the strong drive from a '1T45 in output mode would *NOT* be good for the Holtek TX pin.

--- End quote ---

I had a fear that might not be a good idea either, hence the "hopefully without issue". Oh well.

One thought: are there any transceiver/buffer parts out there that are like the 74LVT1T45, but with an enable pin? That would be nice, to be able to 'shut off' the UART connections during ISP programming.


--- Quote from: Ian.M on December 06, 2018, 04:53:20 am ---Personally, rather than increase the complexity and respin the board, I'd live  with the need to disconnect USB before doing AVR ISP, and put a bootloader on the MCU so I could flash it over the UART with a simple button to ground /RESET plugged into the ISP header to trigger bootloader entry.   If that doesn't fit your workflow, I'd suggest getting a USB switch, so you can connect/disconnect it at the push of a button.

--- End quote ---

I have been briefly looking at using a bootloader, to gain the possibility of firmware updates over the USB. There appears to be an adaptation of Optiboot for the ATmega32M1 (although not sure if the GitHub pull request got merged into the main thing). I think serial programming for that using the STK500 protocol in Atmel Studio might simply be a case of going to Tools->Add Target and choosing 'STK500' and the COM port the Holtek USB appears as. One question mark, however, is whether Optiboot being GPL licensed means I'll be able to sell this device in the future if I want to. :-\
Ian.M:
If you take your idea of reversing the '1T45 direction and add a 1K resistor between the '1T45 and the Holtek TX output, it will limit the current to what the TX pin can handle.  Put the resistor as close as possible to the '1T45 to minimise noise pickup and do least evil to the serial data edges.   

Another idea would be to power the MCU side of the '1T45 in the TX ine from the Holtek from another 1T45's output acting as a buffer for the /RESET signal.  That will make the inline '1T45's output Hi-Z when reset is low.   It may need 1nF decoupling on the power in powered from the output.
Navigation
Message Index
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod