light_ws2812 - I thought this would be easier!

Go To Last Post
45 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm trying to light up a simple string of WS2811 I got cheap on line. I thought I could use the libraries found on GitHub ( https://github.com/cpldcpu/light_ws2812/tree/master/light_ws2812_AVR ).

 

I'm using Studio7, and an ATMega 4809 Curiosity Nano. But nothing is compiling in the Studio7 environment. I've tried all kinds of (probably silly) things, but out of the frying pan, into the fire, the solution was not in my grasp.

 

Almost out of desperation, I tried an Atmel Start Configurator project simply using the 4809 curiosity Nano as the platform, exported/imported that into Studio7, added the light_ws2812 library and a sample loop, but still all manner of warnings and errors. Sheesh!

 

So, I ask you fine folks, if you were to start such a project, what steps would you take?? 

 

 

Last Edited: Mon. Feb 24, 2020 - 03:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Can you show the kind of errors you mean? I'm just reading this bit:

That seems pretty clear and simple - so what goes wrong when you do as it directs?

 

(just trying it now to see if I can create an AS7 project doing the same)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use an Arduino with a ready built library from Adafruit to run WS2812's  Should work on the WS2811.

 

But the Arduino UNO is a Mega328.  Not sure if the library will work on the 4809.

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not trying to be rude, but I will be unable to respond for the next few hours, I'm not trying to ignore any help! Chat soon.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK so some of the build problems I can fix and some I can't. The first stems from:

#define ws2812_PORTREG  CONCAT_EXP(PORT,ws2812_port)
#define ws2812_DDRREG   CONCAT_EXP(DDR,ws2812_port)

That is in light_ws2812.h. It is making the assumption (that is true for real tiny/mega AVR) that GPIO registers have names like PORTB and DDRB. But 4809 (because it's not really an AVR) uses Xmega naming. So the equivalent of PORTB is PORTB_OUT and the equivalent of DDRB is PORTB_DIR. Now these existing lines are trying to do something "clever" where "PORT" and "DDR" are fixed then the "B" (to pick the port)  comes from somewhere else. In fact they use:

#if !defined(ws2812_port)
#define ws2812_port B   // Data port
#endif

than all this "CONCAT()" nonsense is gluing the two bits together. So I'd actually forget all that and just go with:

#define ws2812_PORTREG  PORTB_OUT
#define ws2812_DDRREG   PORTB_DIR

replacing "B" in that with whatever port you want to use. But the next problem (I tried to use "Rainbow" as an example) is that while the port is defined in the above way they had a separate:

int main(void)
{

	uint8_t j = 1;
	uint8_t k = 1;

	DDRB|=_BV(ws2812_pin);

where they've gone and used the tiny/mega "DDRB" name again (so much for "configuration"!). So anyway you could just also change this line to be:

	PORTB_DIR |= _BV(ws2812_pin);

to use the "new name". 

 

However this just clears the "easy" errors but now you start getting errors like:

D:\test\test\light_ws2812.c(119,5): warning: asm operand 2 probably doesn't match constraints
		     asm volatile(
		     ^
D:\test\test\light_ws2812.c(119,5): error: impossible constraint in 'asm'

and this is a real problem. It's because the code is using things like:

    asm volatile(
    "       ldi   %0,8  \n\t"
    "loop%=:            \n\t"
    "       out   %2,%3 \n\t"    //  '1' [01] '0' [01] - re

but while you can "OUT" to "PORTB" on a Tiny/Mega you cannot OUT to PORTB_OUT on an Xmega. That's because in XMEGA all the PORT (and DIR) registers are not in range of the OUT opcode.

 

One might think that a simple solution would be:

    "       STS   %2,%3 \n\t"    //  '1' [01] '0' [01] - re

(change OUT to STS) but this is not going to work for a number of reasons. For one the asm() constraint says that %2 is an "IO location" but it isn't and WS2818 is so timing critical that if you change an OUT to an STS you change the number of CPU cycles so the cirtical timing will be thrown out by making such a change (and there are more OUTs to follow in the asm() too).

 

So the actual solution here is to use a special Xmega feature called Virtual Ports (VPORTs) that remap the PORT registers back in to the IN/OUT IO space where they should have been all along.

 

Only thing is that I haven't a clue how you do VPORTs on a 4809. I *think* it could be as simple as the VPORTs being configured by default as PORTA/B/C/D in which case it'd just be replacing PORTB_DIR/PORTB_OUT with VPORTB_DIR/VPORTB_OUT (or whatever weird and whacky name they've given them) and it might all work.

 

But as I say this isn't one I can fix as I don't have the enthusiasm to learn a whole new micro architecture - I'm happy with tiny/mega - won't care about Xmega. But perhaps someone who does use Xmega chips can advise more detail abvout VPORTs work on 4809 ??

Last Edited: Mon. Feb 24, 2020 - 04:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

OK so I gave in and read the 4809 data. The rumour I'd heard is true - unlike other Xmega you don't have to "map registers to vports" there is a fixed mapping already set up:

 

 

So all of A..F are potential in the IO space. And for each VPORT there is this mapping:

 

 

so if I read that right one would just use VPORTB_DIR and VPORTB_OUT and it *might* work.

 

EDIT: well strike me down and call me Mabel. It only bloomin' worked:

Build succeeded.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

All I really did was change:

#define ws2812_PORTREG  VPORTB_OUT
#define ws2812_DDRREG   VPORTB_DIR

I guess there's something to be said for these new style Xmega where you don't have to worry about setting up VPORT mapping !!

Last Edited: Mon. Feb 24, 2020 - 04:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you can use the ATxmega32E5 (or some E5), you can greatly simplify your life.  You can use some of the E5's configurable logic to generate WS2812 bit timing using a USART as a SPI master.  Sending a byte of WS2812 data is no more difficult than writing a byte to the TX register.  This frees the CPU to do other things.  You can use DMA to keep the WS2812 pipe filled, with virtually no CPU intervention.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Altazi wrote:

If you can use the ATxmega32E5 (or some E5), you can greatly simplify your life.  You can use some of the E5's configurable logic to generate WS2812 bit timing using a USART as a SPI master.  Sending a byte of WS2812 data is no more difficult than writing a byte to the TX register.  This frees the CPU to do other things.  You can use DMA to keep the WS2812 pipe filled, with virtually no CPU intervention.

 

Don't suppose you have a link to any examples by chance?  I would be very interested in taking a look at that.

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

This is what I found.  It looks similar to what I came up with.  Mine is in assembler, this is in C.

 

https://www.ejberg.dk/portfolio/...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

THANKS!!!

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

FWIW, I have used the ATxmega32E5 on several projects on custom PCBs to drive WS2812B LEDs.  You will need to level shift the output to 0-5V for the LEDs.  I used the 74LVC1G17.

 

[EDIT:  I also put a 100-ohm series resistor on the output of the '17 to match the impedance of the wire leading to external LEDs.  It eliminated distortions that appear after several feet of wire.]

Last Edited: Mon. Feb 24, 2020 - 07:47 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It can be realized by CCL of AVR0 / 1.
I use it to draw a 32x32 WS2812B dot matrix without CPU intervention.

 

Last Edited: Mon. Feb 24, 2020 - 07:59 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Man, you guys are good. Can't wait to get back to it and try some of this out. Many thanks, I'll report back.
My only reason for using the 4809 curiosity nano is because I had a spare sitting on my bench! Nice to know there are choices available.

Last Edited: Tue. Feb 25, 2020 - 12:34 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, so I got it to build! Woohoo! It's not controlling the LEDs correctly, but at least it builds!

 

One step at a time...

 

Thanks again!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you are running this on an ATxmega32E5 or other E5-series device, the output is 3.3V logic levels.  If you haven't done so, the output needs to be level-shifted to the 5V logic levels required by the LEDs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Altazi wrote:
If you are running this on an ATxmega32E5
Nope, he said 4809

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, finally back on this, now that I'm working from home, I have a nice 'scope to see what is going on.

 

To eliminate the compiler nonsense, I switched from the ATMega4809 to a nice litte ATtiny10, and I also have an ATtiny85 to play with. I'm using the simple RGB Blinky demo.

 

So, on my scope, I can see the diffferent pulse witdhs in the group of 24 as the program cycles thru the three colors. That part is working.

 

But the frequency is way too slow, 80kHz on the tiny10, and 166kHz on the tiny85. It should be 800kHz. What the actual fudge is going on here?? Anyone? 

 

Here is my program for the Tiny85: For the tiny10 I simply change the F_CPU.

#define F_CPU 16000000
#include <util/delay.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include "light_ws2812.h"

struct cRGB led[1];

int main(void)
{
	#ifdef __AVR_ATtiny10__
		CCP=0xD8;		// configuration change protection, write signature
		CLKPSR=0x00;	// set cpu clock prescaler =1 (8Mhz) (attiny 4/5/9/10)
	#endif

	#ifdef __AVR_ATtiny85__
		CLKPR = 0x80;
		CLKPR = 0x00;
	#endif
	
	while(1)
	{
		led[0].r=255;led[0].g=00;led[0].b=0;    // Write red to array
		ws2812_setleds(led,1);
		_delay_ms(500);                         // wait for 500ms.

		led[0].r=0;led[0].g=255;led[0].b=0;			// green
		ws2812_setleds(led,1);
		_delay_ms(500);

		led[0].r=0;led[0].g=00;led[0].b=255;		// blue
		ws2812_setleds(led,1);
		_delay_ms(500);
	}
}

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Remember that the clock is usually divide by 6 or 8 depending on the chip, so you need to change the pre-scalers accordingly.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Here is my program for the Tiny85: For the tiny10 I simply change the F_CPU.

#define F_CPU 16000000

Exactly how true is the 16000000UL in that? 

 

Also exactly how is this library "timed" anyway? If it too relies on knowing F_CPU then there is no point in only putting that at the top of main.c - when main () calls ws2812_setleds() how will the code in ws2812_setleds() know the CPU speed to get its timing right?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
Remember that the clock is usually divide by 6 or 8 depending on the chip, so you need to change the pre-scalers accordingly.

clawson wrote:
Exactly how true is the 16000000UL in that? 

 

See FAQ #3 in clawson's signature, and Tip #3 in mine - as well as UARTs, they apply to any & all timings derived from the clock frequency ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the input, folks. When I set the fuse to have the clock appear on a pin, it is indeed 16MHz.

 

I'm beginning to think it's something with the Studio7 environment?? I notice, in the documentation for the light_ws2812, there is a makefile. Maybe I need to use that makefile with Studio7?? I must admit I don't know enough about the compiling process.

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

 

Also exactly how is this library "timed" anyway? If it too relies on knowing F_CPU then there is no point in only putting that at the top of main.c - when main () calls ws2812_setleds() how will the code in ws2812_setleds() know the CPU speed to get its timing right?

Y'know, that's an interesting topic. If I change the declaration to  :

#define F_CPU 8000000

but leave the chip running at 16MHz, the RGB Blinky part runs twice as fast, but the frequency of the pulses remain 166kHz.

 

So, it look like the library itself isn't reacting to the F_CPU definition, although it seems to use it in calculations.  

 

Curiouser and curiouser.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, out of curiousity, I added F_CPU to the light_ws2812.c, and it works! Shazam!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kabasan, I can't quite figure this out. You need a 400ns pulse at the mid-point of the 1200ns which is when you clock the data out, right? (going by the nice diagram here https://www.ejberg.dk/portfolio/ws2812-xcl/).  Does the CCL filter allow you to delay the TCB 1 shot pulse somehow?  Any chance of a code snippet?  Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

KarlFrick54 wrote:
I added F_CPU to the light_ws2812.c, and it works!

exactly as clawson explained in #19 !

 

Now please mark the solution - see Tip #5 in my signature.

 

EDIT

 

Rather than having to add - and maintain - the same definition in multiple source files, consider adding it to the Project options:

 

https://www.avrfreaks.net/commen...

 

https://www.avrfreaks.net/commen...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Sat. Mar 28, 2020 - 10:27 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The lesson you have learned here is don't use #define for F_CPU. Every file in the project that may need to use F_CPU needs access to the SAME value. So don't just #define it in one file. Instead arrange for the whole compilation to be given a command line -D, in AS7 you do this with "Symbols". If you add "F_CPU=16000000UL" in that section then every file will be compiled with -DF_CPU=16000000UL so they ALL get to see the shared #define. You can still use #define for "private" defines but any that apply to all files do with -D

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, I actually used the xmega32E5 XCL driver.
And I wanted to realize that with the CCL of AVR-0 / 1, so I devised it.
Currently it works perfectly on my product.
You can publish the driver code, but the comments are in your native language.
Can you give me some time?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I added neo.asm to the Projects section.   This is an assembly language demo of WS2812 programmable LEDs for the Tiny25 (at  8MHz).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am currently modifying the comment.
First, we will show what the waveform of the MSPI data converted by the CCL looks like. This uses tiny1616.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is a sample project of WS2812B driver using CCL.

Just use tiny1616 and connect WS2812B to Pin2 (PA4).

The sample code sets each of the 7 LEDs to 7 colors of RGBCMYW.

Drivers are available for tiny-0 / 1 and mega-0. (Probably)

 

There is no readme because I am not fluent in English. sorry.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

kabasan wrote:
This is a sample project of WS2812B driver using CCL.

 

Fantastic, thanks very much! I'll have a play around with it and let you know how I get on. It should be easy enough to adjust the timing for running at 10MHz in a 3.3V circuit, right?  Anyway, very nice not to waste all the CPU cycles bit banging.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Since this driver is interrupt driven, there is no work during transmission except for the MSPI DRE interrupt.
I have never tried 10MHz operation. It is whether WS2812 allows the delay error of TCB and CCL.
I will try if I have time tomorrow.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried your code with some SK6812 LEDs on an ATtiny416 and it works great!

 

kabasan wrote:

I have never tried 10MHz operation. It is whether WS2812 allows the delay error of TCB and CCL.

 

I tried running the MCU at 10MHz and it works perfectly if i set UARTX_BAUD to half, set LUTB_FILTER_gc to 0 and change TCBX CCMP & CNT from 7 to 3.  I am measuring a bit rate of 846khz on my setup.

 

Last Edited: Sat. Mar 28, 2020 - 08:44 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You did a great thing while I was asleep.
What you have changed is exactly what I was trying to do and it's precise. Add feedback comments to my code.

 

Microchip provides a driver using TCA0, but I didn't want to use only one high-performance TCA.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Is this the Microchip example you mean?  https://start.atmel.com/#application/Atmel%3Acore_independent_night_light_using_ccl%3A1.0.0%3A%3AApplication%3ACORE_INDEPENDENT_NIGHT_LIGHT_USING_CCL%3A

 

It uses SPI and keeps the CPU busy so it's not really much better than bit banging.  The USART interrupt method in your code is much more efficient.

 

At 10MHz the second LUT is not necessary any more so the code can be simplified a little.  I wondered if I could use CCL_INSEL0_USART0_gc instead of EVENT0 for XCK in the LUT.  However, when I tried this the timing was not correct and I found something a bit odd.  I made a LUT which outputs only the XCK signal and I also sampled the XCK from the output pin:

 

 

You can see the LUT output is 100ns earlier (1 cycle) than the XCK pin.  I tried the same test with TxD:

 

So the TxD timing is precise but XCK is one cycle earlier which seems a bit weird and could make CCL_INSEL1_USART0_gc | CCL_INSEL0_USART0_gc hard to use!

 

Anyway, your code seems like a very efficient solution for 10/20MHz WS2812 control on these chips if you need to use the CPU for other tasks.  Maybe not so good if you need to save pins on the smaller packages or if you need to use the USART for something else.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was waiting for the tiny2 series because it would use the only USART in tiny0 / 1.

And for that, I edited the header file to work with the mega0 series.
In fact, I use this driver on mega4809 and mega3208.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh?
Application note AN2387 using TCA and CCL has been deleted.
The composition diagram is extracted from the saved Japanese version.
I have searched and it seems that some people have tried it.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think it's here:  https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en595063

 

I experimented with your code some more after referring to the timing diagram in that app note and made a version that works at 5, 8, 10, 16 and 20 MHz with my SK6812 LEDs.  It has slightly longer gaps between bits than is strictly necessary but it is easier to configure the pulse widths for different types of LEDs (I made a LOW_PULSE and HIGH_PULSE define).  I changed the code to only output pulses when XCK=0 so that the TCB start delay doesn't matter but because TxD begins in a high state I had to invert the data to prevent an incorrect start bit.  

 

I've attached my modified version.  I removed the MEGA code because I do not have any megas to test with and I didn't want to include broken code but it should be easy to fix up.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why am I inaccessible?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


working now here:

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is Japan blocked or is my individual blocked? ....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you re-tried?

 

Can you access anything else on the Microchip site?

 

What if you go via the Product Page for the chip?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The situation does not change.
In fact, it has been in this state for quite some time now, but I thought that Microchip was reorganizing the page.
I can't see all documents from the tiny1616 device page.
The same is true at office and at home.
The same is true for different browsers.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If I google "Application note AN2387", I can get a direct PDF link:

 

http://ww1.microchip.com/downloads/en/AppNotes/00002387B.pdf

 

does that work?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, I can view the PDF directly.