Electronics > Beginners
Attiny85: no serial output?
sleemanj:
> The programmer I'm using clearly indicates serial in and out (MOSI, MISO).
That is not serial, that is SPI.
> Is it really impossible to do that while it uses pin interrupts?
I already described ways around your problems in the previous post.
sleemanj:
> I'm not sure what kind of cable I actually need. Would a USB to TTL Serial Cable work?
USB to TTL adapter. Get one with CH340 or CP2102. Cost a dollar or two from China.
Nominal Animal:
--- Quote from: phennessey on January 28, 2020, 03:56:56 am ---The programmer I'm using clearly indicates serial in and out (MOSI, MISO). Why can't these work for me?
--- End quote ---
There are a number of serial protocols used by these Arduino-compatible microcontrollers. The most common ones are UART, SPI, I2C, and CAN. They all transmit bits serially, one after another, but the exact implementation details differ; they are not interchangeable. (Some microcontrollers do have hardware that can support more than one using the same pins -- not at the same time, but to allow wider configurability.)
(UART and RS-232 are closely related, typically only the physical connector and voltage levels differ. TTL voltage levels sleemanj mentioned are most commonly used, with "zero" being less than 0.8 V, and "one" being 2.0 V or higher, when a 5 V supply is used.)
Because of various reasons, when someone says "serial" when talking about microcontrollers, they usually mean the UART type serial connection. This is particularly true within the Arduino environment: The Serial Monitor window only supports UART connection to the microcontroller.
Many AVRs, including ATtiny85, can be reprogrammed using SPI. Your programming dongle connects to the AVR using five pins: VCC, GND, MOSI (master out slave in; from programmer to AVR), MISO (master in slave out; from AVR to programmer), and MCLK (SPI clock).
Yes, you can use that USB-SPI dongle to talk to your computer, but the Arduino environment cannot not show that communication in the serial monitor window.
So, what you need to do, after programming the ATtiny85, is to disconnect it from the programmer, then connect it to a USB-UART dongle. They indeed cost only about 1-2 USD/EUR, shipped, from eBay/BangGood. They are simple devices, and the ones I've got, Just Work.
phennessey:
--- Quote from: Nominal Animal on January 28, 2020, 07:00:31 am ---Yes, you can use that USB-SPI dongle to talk to your computer, but the Arduino environment cannot not show that communication in the serial monitor window.
--- End quote ---
THIS. This right here, people. This is the information I needed (emphasis added).
Thank you all so much for your help and insight. You've given me everything I think I need to figure this out. I will post results here once I get it working!
Navigation
[0] Message Index
[*] Previous page
Go to full version