#avr Logs

Jun 09 2017

#avr Calendar

12:02 AM day__ is now known as daey
12:46 AM JanC_ is now known as JanC
02:35 AM day__ is now known as daey
04:43 AM shifttymike is now known as Guest72412
06:23 AM Emil: julius: did you get it working?=
06:23 AM Emil: https://hackaday.io/project/10533-nano-tty/log/34525-smooth-scrolling-on-a-ssd1306
06:24 AM Emil: https://github.com/greiman/SSD1306Ascii
07:41 AM APic is now known as APic\splat
10:39 AM day__ is now known as daey
11:04 AM Tom_itx is now known as Tom_L
12:32 PM LOMAS: I got a problem regarding serial UART reception to solve. It is said that space indicates end of frame which is necessary to detect using sixteen bit timer in the CTC mode. The
12:32 PM LOMAS: timer should be activated / cleared after each character receive and deactivated in the timer overflow
12:32 PM LOMAS: interrupt service routine after whole frame is received.
12:33 PM LOMAS: I could not figure out to make use of timer in this case. Do you guys get this problem? Please help me to figure out this.
12:34 PM * LeoNerd never usually likes such timing-sensitive serial signals
12:34 PM LeoNerd: But anyway that all sounds pretty straightforward.. what specifically is the trouble?
12:35 PM LOMAS: I don't know much about reception of serial message using timer.
12:35 PM LOMAS: So I am bit lost about applying timer in this case
12:36 PM cehteh: i dont get the problem
12:36 PM LeoNerd: Those sound like two separate parts of it
12:36 PM LeoNerd: *when* you have received a character, start the tuimer
12:36 PM LeoNerd: Keep resetting it on receipt of more charactrs
12:36 PM cehteh: you want to measure pauses between frames?
12:36 PM LeoNerd: If it ever expires, that means you didn't receive a character in a certain time
12:36 PM cehteh: or keep the timer spinning and store the times
12:36 PM LeoNerd: It's a fairly typical "watchdog" timer case
12:36 PM cehteh: better when you already need the timer somewhere else
12:36 PM cehteh: yes
12:37 PM LeoNerd: Wellyah, personally I'd do it with other means, and not *directly* poking the timer module itself
12:37 PM LeoNerd: But depends on use-cases.. if you have it spare, might as well use it
12:38 PM LOMAS: cehteh, I got little bit idea of checking whether the character received successfully or not using timer. Can you please suggest any text to refer in this case if you know ?
12:39 PM cehteh: LOMAS: you are using the uart?
12:39 PM LOMAS: yes
12:39 PM cehteh: serial needs some pauses to sync, uart handles that automatically, no need for a timer
12:40 PM LOMAS: LeoNerd, Can you please suggest any text to refer in this case if you know ?
12:40 PM LeoNerd: cehteh: I believe this is a dead-time timer
12:40 PM LeoNerd: Gah
12:40 PM cehteh: but when you constantly pushing bytes over serial and while that your receiver starts up it gets garbage
12:40 PM LeoNerd: I'm failing to understand what's difficult here
12:40 PM LeoNerd: This is a tiny bit of Lego
12:40 PM LeoNerd: seriously
12:40 PM LeoNerd: Pick up the bricks. Stick them together. Done
12:40 PM cehteh: yes i somehow dont understand the problem either
12:40 PM LeoNerd: cehteh: "tell me when Idon't receive a UART byte for 10msec" for example
12:40 PM LeoNerd: I just invented the 10msec.
12:40 PM cehteh: ok
12:40 PM LeoNerd: While bytes are received quickly, do nothing. Once we stop receiving a byte, let the timer expire and do something
12:41 PM LeoNerd: I have no idea what the something or the bytes are or what the exact timer value should be, but those are specific to the problem
12:41 PM cehteh: could be as simple as using the real watchdog and wdr it in the receive ISR
12:41 PM LeoNerd: Nah
12:41 PM LeoNerd: WDT isn't reliable enough for timing
12:41 PM cehteh: well i absolutely dont know what he wants to do exactly
12:41 PM LeoNerd: It's a very simple RC oscillator built into the chip, whose exact period is only guaranteed to about 20%
12:41 PM cehteh: its ok for things like "is serial dead?"
12:42 PM LeoNerd: I've no idea... would depend on the original problem description from LOMAS
12:42 PM cehteh: and i also using tinys fused to run from the wdt clock which works somewhat well
12:42 PM LeoNerd: But anyway, using e.g. the 16bit Timer1 like the WDT is just as simple
12:42 PM cehteh: LOMAS: you need to explain your problem a bit better
12:42 PM LeoNerd: So no need to complicate things with the WDT
12:43 PM LOMAS: LeoNerd, I'm catching the use of timer in this case.
12:43 PM cehteh: but could be a waste, timers are precious resources and they take power as well
12:43 PM LOMAS: is there any examples related ?
12:43 PM LeoNerd: Eh. *shrug* they're pretty low-power really
12:43 PM LeoNerd: Also again if you're not using it for anything *else* then it doesn't matter
12:43 PM LeoNerd: 99% of the time I have Timer0 for my system ticker and the other timers are all sat idle
12:43 PM cehteh: if it has to turn on some oscillator or pll then not (ok not in the default case)
12:44 PM LeoNerd: So occasional odd timing cases can just use those if required
12:44 PM LeoNerd: I doubt the PLLis required here ;)
12:44 PM LeoNerd: ... and we've lost OP
12:44 PM cehteh: heh
12:44 PM cehteh: anyway plenty of ways to do it
12:44 PM LeoNerd: Ah there
12:44 PM LeoNerd: LOMAS: Anyway... Do you know how to use the timer generally?
12:44 PM cehteh: usually i have one timer as system timer spinning
12:45 PM LeoNerd: Do you know how to receive on the UART? If yes to both, then surely just play lego with it
12:45 PM LeoNerd: If no to either, then go look that up
12:45 PM LOMAS: Yes I know the basic stuff
12:45 PM cehteh: using that to time thing would be somewhat easy
12:45 PM LeoNerd: I verymuch doubt you'll find online an *exact* example of all the individual pieces you need glued together exactly right
12:45 PM LeoNerd: Find the pieces. Stick them together
12:46 PM LOMAS: LeoNerd, okay
12:47 PM cehteh: you an either ad-hoc code that, maybe using a timer exclusively, that would be very simple (but wastes the timer)
12:47 PM cehteh: or using a timer you have already running, needs some way to register 'alarms' at specific times then
12:48 PM LeoNerd: Principle is basically the same either way
12:48 PM cehteh: yes
12:48 PM cehteh: well the later (shared timer) needs a bit more coding
12:48 PM LeoNerd: Just using a straight timer module directly is an easier one to look at initially; the only downside is that in bigger things it doesn't work as well, because you run out of timers
12:48 PM cehteh: yes
12:48 PM cehteh: i'd prefer the later one
12:49 PM cehteh: well i solved that for my own, but that code isnt really a example, got considerably complicated
12:49 PM * LeoNerd has a sched.c for things like this ;)
12:49 PM LeoNerd: task_schedule_delayed(TID_TIMEOUT, SEC2TICK(0.5))
12:49 PM cehteh: one can register functions to be called at specified times... store in a special priority queue implementation using a sliding window
12:50 PM LeoNerd: I store timeouts in the array of actual task functions. IT's fixed-size fixed-cost to scan, which is good, buuut.. does mean each task can only be pending atmost once
12:50 PM cehteh: yes, i didnt want that, i needed something configureable on longer running timers
12:51 PM LeoNerd: Mmm
12:51 PM cehteh: (more than 16 bit)
12:51 PM LeoNerd: I tend to use this for things like button debounce
12:51 PM cehteh: thats simple then
12:51 PM LeoNerd: The PCINT ISR just calls task_schedule_delayed() and then the task function itself reads the PIN values
12:52 PM * LeoNerd might distinguish between 'schedule' and 'reschedule' sometime
12:52 PM cehteh: but as soon you have only a 8 bit timer and want to time little longer delays it gets complicated otherwise
12:52 PM LeoNerd: reschedule is good for keeping watchdogs
12:52 PM LeoNerd: I count to 16bit ticks
12:52 PM LeoNerd: I usually tick at around 5 or 10msec, so.. that's 655 seconds... 10 minutes?
12:52 PM LeoNerd: Should be enough for anyone :)
12:52 PM cehteh: my timer can use a 64bit overflow plus 16bit internal counter .. 80 bits together :D
12:52 PM cehteh: plenty time
12:53 PM LeoNerd: I'm still slightly undecided about the architecture though
12:53 PM LeoNerd: Sometimes I keep a pending tick-count slot in every task, sometimes Iuse a different setup with alarms in their own array, that each just schedule a task
12:53 PM cehteh: and the 'sliding window' implementation means that you can store times in near future only (16 bit for example) without wasting a lot of space
12:54 PM LeoNerd: The latter is a bit of indirection, and needs me to keep two sets of enumerations, .. might save a bit of RAM if lots of tasks are never scheduled delayed...
12:54 PM cehteh: priority queue with 80 bits alone to keep the time stored would be wasteful, most events are closer
12:58 PM cehteh: anyway there is a very simple way for LOMAS problem, store a global time for the pending timeout and have a flag if it is active (or just say -1 means nothing active)
12:58 PM cehteh: calculate compare/match for that and set that,
12:58 PM LeoNerd: Really, I think the simplest to explain for now is just using the timer unit directly
12:58 PM LeoNerd: This is about 4 lines of code directly poking the registers :)
12:58 PM cehteh: if already one is active then dont calculate the comparematch but set that global var
12:59 PM LeoNerd: Dont' overcomplicacte it
12:59 PM LOMAS: Yes. I agree with LeoNerd
12:59 PM LeoNerd: Plus given the phrasing of the original problem it sounds like homework anyway; specified with CTC mode quite explicitly
12:59 PM LOMAS: configuring timer and running it is not so big deal
12:59 PM LeoNerd: So.. meh.. just do whatever the teacher wants
12:59 PM cehteh: whenever compare match triggers, check against that global var, either reschedule or trigger
12:59 PM cehteh: well thats the simplest thing when you want to keep the timer spinning
01:00 PM cehteh: i dont overcomplicate
01:00 PM cehteh: also just a few lines of code
01:00 PM LOMAS: LeoNerd, you are right
01:00 PM cehteh: when you can use a timer exclusively things are even easier
01:00 PM cehteh: heh ok damn homework :D
01:01 PM LeoNerd: In unrelated news: excitement builds as my first 4layer board is scheduled to hit fab on 14th...
01:01 PM LOMAS: cehteh, you may be right, but I seem understanding LeoNerd's way
01:01 PM cehteh: well in that case, exclusive timer ... whenever you receive data you just reset the timer
01:01 PM LOMAS: LeoNerd, can you share it with us
01:01 PM LeoNerd: I explained it already, no?
01:02 PM LeoNerd: On receipt of a byte, just reset the timer entirely. if the timer expires, switch it off and do the thing you needed to do when it expired
01:02 PM LOMAS: LeoNerd, okay
01:02 PM cehteh: exactly
01:02 PM LeoNerd: That gives you a one-shot rescheduled watchdog timer
01:02 PM cehteh: too bad they teach so unpractical things at schools
01:02 PM LeoNerd: It's perfectly fine, really
01:02 PM cehteh: if you have that timer for spare
01:03 PM cehteh: then its perfectly fine yes
01:03 PM LeoNerd: On my most recent ATmega328-based project, I was using timer1 and timer2 *purely* to drive the PWM chip I was running a bunch of stage LEDs from
01:03 PM LeoNerd: It was a bit ugly but, eh... who cares? It got the job done and my stage show ran just fine
01:03 PM LeoNerd: It only needed to be "good enough". And on the day, it was
01:03 PM cehteh: often you have a timer for spare because you use another timer as system clock (in the complex way we discussed above)
01:03 PM LeoNerd: Yah
01:04 PM cehteh: but when the kids learn that they need a new timer for every little thing, then they run out of timers and into problems :)
01:04 PM LeoNerd: I was using one of these to generate the GSCLK signal by being a fast PWM output, and the other to count when 4096 cycles had elapsed so Icould restart the blanking cycle
01:04 PM LeoNerd: Sure
01:04 PM LeoNerd: So maybe that's the next question on the homework exercise
01:04 PM LeoNerd: Dont' start students off in the deep end
01:04 PM LeoNerd: Often, when learning, you need to see the simple-but-dumb way first, to get a handle on it, and to see "OK this will be a problem if..."
01:05 PM cehteh: well that thing i sketched above, is still simple enough to implement and will work with a shared timer
01:05 PM LeoNerd: When learning something new, it's hard to start off in the fancy end because you haven't even /seen/ what problems it avoids yet
01:13 PM LOMAS: anyway thanks LeoNerd and cehteh :)
01:44 PM Emil: Hmm
01:45 PM Emil: So I'm trying to turn a 12 bit two's complement number into a more reasonable presentation
01:45 PM LeoNerd: What is "reasonable" here?
01:45 PM Emil: 16 bit number
01:45 PM Emil: char filter(unsigned char h, unsigned char l)
01:45 PM Emil: { unsigned char s; int m; s=h&(1<<3); m=((h|(240*s))<<8)|l; m=((m^s)-s)>>2; return((m&127)*(1-2*s));
01:45 PM cehteh: hex?
01:45 PM LeoNerd: ... whaton earth is that?
01:45 PM Emil: }
01:45 PM cehteh: yea
01:45 PM Emil: It's a function that should do it
01:46 PM LeoNerd: int16_t n = input; if(n & _BV(11)) n |= 0xF000;
01:46 PM LeoNerd: done
01:46 PM cehteh: first, what do you mean about 'reasonable'
01:46 PM Emil: but it only werks for positive numbers
01:46 PM LeoNerd: ^-- "if the bitpattern represents a negative number, sign-extend it"
01:46 PM Emil: cehteh: like I said, 16 bit number
01:47 PM cehteh: see LeoNerds example
01:47 PM Emil: That doesn't work
01:47 PM cehteh: in what way?
01:48 PM Emil: Ah yeah, forgot to say that I want a signed 8 bit number out of it
01:48 PM LeoNerd: I generated a signed 16bit number
01:48 PM Emil: I know
01:48 PM cehteh: you are unclear :D
01:48 PM LeoNerd: If you're going to squash a 12bit into an 8bit you're now truncating
01:48 PM Emil: cehteh: everyone is sometimes
01:48 PM cehteh: what information do you want to drop?
01:48 PM Emil: LeoNerd: I know
01:48 PM Emil: impossible range
01:49 PM cehteh: lossy math compression :D
01:50 PM LeoNerd: So maybe take my 16bit value and take just the upper half of it?
01:50 PM Emil: LeoNerd: matey
01:50 PM LeoNerd: Er.. upper 2/3s
01:50 PM cehteh: upper half (8 bit)
01:51 PM cehteh: or return h<<4|l>>4;
01:51 PM cehteh: or rephrase your problem so that i understand it
01:52 PM LeoNerd: int8_t x = (input & _BV(11) ? input | 0xF000 : input) >> 4;
01:54 PM Emil: LeoNerd: that does not take into account sign
01:54 PM LeoNerd: That's what the ternary is for
01:55 PM LeoNerd: If it had the sign bit set, account for sign-extension
01:55 PM Emil: No I mean it literally does not take into account that the number is 12 bits (1 bit sign)
01:55 PM Emil: You cant just take the lower half
01:55 PM LeoNerd: ?
01:55 PM LeoNerd: You wanted an 8bit result
01:56 PM LeoNerd: If the sign bit (the 11th) of 'input' was set, then I've just |'ed 0xF000 into it. Which makes the (signed) int8_x appear negative
01:56 PM LeoNerd: The >> operator will respect that
01:56 PM Emil: If that does what I think it does then it's also required to do &127|(sign<<7)
01:56 PM LeoNerd: Nope
01:56 PM LeoNerd: The >> and << operators know when they're operating on signed values and sign-extend accordingly
01:57 PM cehteh: did you try my return h<<4|l>>4;
01:57 PM cehteh: and l must be unsigned for that
01:57 PM LeoNerd: This is one of the reasons why C has signed vs. unsigned integers but only one >> operator; it doesn't need the assembly-level version of logical vs. arithmetic shift
01:57 PM Emil: LeoNerd: now that's interesting
01:57 PM cehteh: right shifting pulls the sign
01:58 PM Emil: cehteh: I don't want the upper half, though
01:58 PM * LeoNerd is once again losing sight of what the requred problem is... decides to go home
01:58 PM cehteh: i dont know what you want
01:59 PM cehteh: i thought you just want to drop the lowest 4 bits
02:00 PM LeoNerd: You're starting with a 12bit signed number. You're creating a.. 8bit result? Can you maybe draw a table showing, for certain exemplar input 12bit values, what 8bit result you expect to see?
02:02 PM Emil: https://emil.fi/jako/kuvat/2017-06-09_21-32-31_IKZUrmBG.png
02:03 PM Emil: You can disregard the 0.25C steps
02:03 PM Emil: That achieved with just >>2
02:04 PM Emil: that's
02:04 PM cehteh: ds18b20? :D
02:04 PM Emil: no
02:05 PM cehteh: still i dont see what result you want
02:05 PM cehteh: a single signed char from -128 to 127 in °C ?
02:05 PM Emil: yes
02:06 PM cehteh: just tell that in the first place :D
02:10 PM cehteh: LeoNerds solution (but shifted by 2, or 6) still applies, doing the calculation in 16bit returning 8bit
02:12 PM Emil: Well
02:12 PM Emil: I'll be damned
02:12 PM Emil: thanks
02:13 PM Emil: https://emil.fi/jako/kuvat/2017-06-09_21-43-16_Fb9JHA1T.png
02:13 PM cehteh: you can do it with shifts like i shown too
02:13 PM cehteh: only chars then
02:14 PM cehteh: but i guess it isnt that important to scrape the least possible performance from this
02:14 PM Emil: 2017-06-09 21:26:52 +0300 < cehteh> did you try my return h<<4|l>>4; takes the upper half
02:15 PM cehteh: yes, that principle i meant, not exacly that shifts
02:15 PM day__ is now known as daey
02:18 PM Emil: https://emil.fi/jako/kuvat/2017-06-09_21-47-43_vS4CJmtx.png
02:19 PM Emil: I bet there's some edge case where that "gcc knows when you want signed" fails
02:20 PM cehteh: wtf is that
02:20 PM Emil: https://emil.fi/jako/kuvat/2017-06-09_21-50-36_eeprNea1.png
02:21 PM Emil: It's the same thing
02:22 PM cehteh: now try return h<<6|l>>2;
02:25 PM Emil: cehteh: you are a magician
02:26 PM cehteh: i wish i would be
03:06 PM Emil: https://emil.fi/jako/kuvat/2017-06-09_22-36-25_Mpvb5Wpj.png
03:06 PM Emil: What the fuck can be wrong with that
03:07 PM Emil: Ah
03:07 PM Emil: fucking hell
03:07 PM * Emil facepalms
03:16 PM Emil: Hmm
03:16 PM Emil: btw
03:16 PM Emil: anyone know of a really quick (low latency) way to capture images from the raspicam?
03:17 PM Emil: I'll implement the streaming myself over websockets since everything else has a fuckton of latency
03:19 PM cehteh: no idea, but doesnt it have a proper device driver in the kernel?
03:19 PM cehteh: first step would be not using python :D
03:20 PM specing: Emil: is it USB?
03:21 PM cehteh: from other cam stuff, i think you want to code it properly .. first have some time for initializtion and parameters .. and then only grab the frames preferably from shared memory or somesuch
03:21 PM cehteh: specing: it has a dedicated camera port
03:21 PM cehteh: directly tied to the cpu
03:22 PM cehteh: dont forget its some smartphone cpu
03:33 PM Jartza: is it "tied" to cpu, or does it have DMA?
03:35 PM cehteh: dunno but i guess yes
03:35 PM cehteh: rpi is a weird platform
03:36 PM cehteh: the GPU is actually the main processor .. the CPU is just slapped onto it
03:40 PM polprog: somebody got pissed at microchip:
03:40 PM polprog: http://www.fuckit3.com/
03:42 PM cehteh: lol
03:49 PM Emil: It's got a v4l2 driver though
03:50 PM cehteh: that should be reasonable fast
03:50 PM cehteh: usually with digital stuff you get at least always a 1-2 frames delay depends on how its buffered, when you buffer on your app side thats 1 frame more
03:51 PM Emil: polprog: :D
03:51 PM Emil: cehteh:
03:51 PM Emil: well
03:51 PM cehteh: 20ms per frame .. at 50fps
03:51 PM Emil: right now it is at like 15 seconds
03:51 PM Emil: :D
03:51 PM Emil: Well, perhaps only 10
03:51 PM Emil: but still
03:51 PM cehteh: i thought it can do video?
03:51 PM Emil: that's like 2 orders of magnitude faster if it's like 100ms :D
03:51 PM cehteh: i dont own one
03:51 PM Emil: cehteh: it can
03:52 PM cehteh: well dunno
05:32 PM mark4: so im finding a number of errors either in the io include file for this device or in the documentation for it
05:32 PM mark4: like the sources dont agree with the documentation
05:33 PM mark4: the documentation shows a DACB but not DACA. the sources have NOTHIGN in them for DACB except the register bit definitions for the undefined register
05:34 PM mark4: i mean the sources have nothing for DACA except the bit definitions not B
05:34 PM mark4: i also found another issue last night where the documentation and the io defintion source file do not conincide.
05:36 PM mark4: i would also like to know if anyone here even botheres to try use ASF?
05:36 PM mark4: i cant find ANY documentation on the API at all
05:36 PM mark4: well. nothing that gives me any real info
05:39 PM Emil: probably a pebkac
06:16 PM Lambda_Aurigae: I'm guessing nobody uses ASF.
06:17 PM Lambda_Aurigae: I know I found it unusable.
06:18 PM Lambda_Aurigae: it's supposed to be usable without atmel studio but I found it not so much so.
06:35 PM mark4: if they had a damned API documentation page it would be different
06:36 PM mark4: emil no i def found errors in the documentation... unless the pebkac is at Atmel :)
06:43 PM kre10s: Lambda_Aurigae: atmel software framework is a BIG package. I have used it outside of atmel studio. but it requires allot of time crafting your own makefile.
06:44 PM Lambda_Aurigae: kre10s, yup..and I found nothing useful in it to make me want to spend my time doing so.
06:44 PM Lambda_Aurigae: I prefer the old procyon avrlib...
06:44 PM kre10s: USB? I know I used that before.
06:44 PM Lambda_Aurigae: I don't do USB on avr
06:45 PM Lambda_Aurigae: no dip package AVR chips with USB.
06:45 PM Lambda_Aurigae: for the one usbAVR that I do have, I just used the LUFA stuff by itself.
06:45 PM kre10s: granted I then tore it appart and rewrote it. because it did allot of redundant enable/disable interrupts stuff.
06:47 PM kre10s: I also made use of ther CAN bits.
06:48 PM Lambda_Aurigae: I don't have a need for CAN for anything.
06:49 PM Lambda_Aurigae: only piece of hardware in an AVR that I need someone else's lib to use really is usb...I've stolen Fleury's i2c and lcd libs and massively modded them to my own uses..
06:49 PM Lambda_Aurigae: other than that, I just reinvent the wheel on my own.
06:53 PM kre10s: I envy you man. DIP is so big. You know your in deep when your soldering GNF32L by hand on a pre production batch.
06:59 PM Lambda_Aurigae: I don't do production.
06:59 PM Lambda_Aurigae: 100% personal hobby stuff.
07:07 PM chat is now known as Guest53505
08:57 PM rue_house: Lambda_Aurigae, I'm intesrted in your modded lcd libs
08:57 PM rue_house: what did you do?
11:26 PM locuester: hey all. I've got some atmega328p-pu chips that I successfully programmed with a tinyusb controller. however, the clock speed is off, and they don't control my WS2812 LED controllers at all. data line seems to be wrong mhz.
11:27 PM locuester: when I use my arduino uno, everything is perfect.
11:28 PM locuester: Clock speed seems way off ( delay(1000) takes 16 seconds)
11:29 PM locuester: So I've introduced a 16mhz resonator on the clok pins
11:30 PM locuester: however, I don't have 22pF capacitors as suggested. I've tried other capacitors to no avail. is 22pF that important?
11:30 PM Casper: very
11:31 PM Casper: like, not having it may mean 0MHz
11:31 PM Casper: or unstable
11:31 PM locuester: I'm new to embedded coding liek this but an experienced programmer. can you explain?
11:32 PM locuester: to me a capacitor has always meant liek a water tower. if I use too big, no biggie.... but obviously not true.
11:32 PM locuester: Damn cat messing up my typing, sorry.
11:32 PM locuester: it's behaving like 0mhz
11:32 PM locuester: I get solid lights
11:33 PM Casper: the capacitors are there to stabilise the crystal
11:33 PM locuester: but I know the program works on an arduino
11:33 PM Casper: without them it may work eradically, or not at all
11:33 PM locuester: so back up, simple blink program....
11:33 PM locuester: I put delay (1000), and it actually delays 16 or so seconds.
11:34 PM locuester: no matter what capacitor I try (I don't havfe exactly 22pf).
11:34 PM locuester: Tried huge 10uf and 10pf
11:35 PM locuester: what xatly is making the atmega clock tick?
11:35 PM locuester: I use a 328p-pu, it has an embedded 8mhz, no?
11:40 PM locuester: just wondering why my program that runs great on an arduino uno is causing issue uploaded via tinyusb to a chip directly. I'd like to put this on a prototype board for $5 and be done with it :)