#avr | Logs for 2015-01-28

Back
[01:56:56] <Haohmaru> can i use one parallel port as a clock source and flash with another parallel port?
[01:58:12] <Haohmaru> if i understand correctly, the SCK line is the clock source for programming.. and with "stk200" (parallel port) i can make it slower with -B argument to avrdude
[01:58:16] <Haohmaru> hm..
[02:00:06] <Haohmaru> i mean, if i run one instance of avrdude with "-B 1000 -F -t" that should make it ignore the errors and go into terminal mode, where i suppose it'll sit and wait (and generate clock on the SCK pin)
[02:09:52] <Haohmaru> or maybe it stops generating clock on SCK when there are no commands being sent in terminal mode :/
[03:16:56] <malinus> Haohmaru: sure, you just need a level converter
[03:20:41] <Haohmaru> why?
[03:23:31] <malinus> oh nvm. I thought you wanted to flash trough your port
[03:29:02] <Haohmaru> yes.. flash via parallel port, because i think the usbasp will be too fast
[03:32:41] <malinus> are the voltage levels of a parallel port not like ~20V?
[03:32:48] <malinus> +/-
[03:35:04] <LeoNerd> 1284 is usually just TTL 5V
[03:38:43] <malinus> am I confusing it with serial
[03:38:59] <Haohmaru> this is a printer port.. LTP1
[03:39:00] <twnqx> probably. rs232 can have that, though it's more like +-12
[03:39:37] <LeoNerd> Yah; RS232 is anywhere between about +/-7 to +/-20
[03:40:31] <malinus> yeah I guess I confused rs232 with 128
[03:43:18] <Haohmaru> afaik the parallel port is 5V
[03:43:35] <Haohmaru> at least mine appears to measure as so
[03:43:51] <Haohmaru> but it seems like i can't measure anything coming out of the SCK
[03:44:14] <LeoNerd> It's also more that 1284 is 0-or-+5V, whereas RS232 is + or - voltage
[03:44:17] <Haohmaru> (avrdude is set to terminal mode)
[03:44:36] <LeoNerd> So you usually need a -ve inverter supply as well, to talk that
[04:08:43] <Jartza> talking about rs232, I just found 5 st232cn chips from my storage :)
[04:08:59] <LeoNerd> :)
[06:05:39] <Haohmaru> can anyone explain what's the purpose of the ARP in a tcp/ip stack like uIP?
[06:14:08] <LeoNerd> That's not an AVR question, but since it's quiet I'll take it anyway
[06:14:21] <LeoNerd> Local packet delivery over ethernet, surely?
[06:23:49] <Haohmaru> do you know a more suitable channel?
[06:24:15] <Lambda-Aurigae> ARP is used to convert an IP address to a physical address such as an Ethernet address (also known as a MAC address).
[06:24:55] <Lambda-Aurigae> http://en.wikipedia.org/wiki/Address_Resolution_Protocol
[06:25:24] <Haohmaru> well, i wonder.. if i use uIP, does uIP (or something else) check the incoming packets and their IP address?
[06:25:32] <Jartza> ohh... I still have 18.432MHz oscillators
[06:25:33] <Jartza> yay
[06:25:41] <Jartza> the "magical" value :)
[06:25:58] <LeoNerd> Hm.. what's useful about that number?
[06:26:17] <Lambda-Aurigae> it is easily dividable into regular serial speeds.
[06:26:28] <LeoNerd> Hrm.. I have a 14.7456 for that
[06:27:17] <Jartza> and it's dividable by all the "normal" prescaler values.
[06:27:29] <LeoNerd> Hrm
[06:27:32] <Jartza> but it's also dividable by some of the non-standard uart speeds used
[06:27:37] <Jartza> like 8192 and 4096 baud
[06:27:37] <Lambda-Aurigae> Haohmaru, http://contiki.sourceforge.net/docs/2.6/a01704.html#_details
[06:27:53] <LeoNerd> 14.7456 / 128 => 115.2kBaud; 18.432 / 160 => 115.2kBaud
[06:28:25] <Lambda-Aurigae> 18.x is also faster than 14.x
[06:28:40] <LeoNerd> Well, true.. :) Closer to the 20MHz limit of AVRs
[06:28:42] <Jartza> LeoNerd: yes, 14.7456 is also fine
[06:28:53] <LeoNerd> Yah.. I just bought myself a stack of 14.7s
[06:28:54] <Lambda-Aurigae> Haohmaru, uIP has been incorporated into Contiki.
[06:29:08] <LeoNerd> Couldn't find any small ones though, had to get HC49 size
[06:29:45] <Jartza> but yeah, I bought 18.432 at one point because it's the closest to most avr max clock, which is dividable by "standards"
[06:29:54] <LeoNerd> Sounds useful, yah.
[06:29:55] <Lambda-Aurigae> been running a couple of atmega1284p chips at 24MHz for a few months now.
[06:30:05] <Jartza> just thought I lost them, but found them again
[06:30:30] <Haohmaru> Lambda-Aurigae okay.. but.. can my device have 2 IPs simultaneously?
[06:30:46] <Lambda-Aurigae> I doubt uIP can handle that.
[07:05:54] <Haohmaru> will this ARP thing reject packets that are addressed to the device's MAC address but the IP is different?
[07:06:09] <LeoNerd> I'd hope not. That's called "routing"
[07:06:26] <LeoNerd> At this point you likely want ot go read up about how IP works, and how IP runs over the top of ethernet
[07:06:58] <Haohmaru> yeah i'm reading that stuff but it's not very clear yet
[07:07:26] <LeoNerd> ARP is simply a mechanism to find out the hardware address (usually "ethernet") that some IP address lives on
[07:08:02] <LeoNerd> That's it. That's all it is. "Hey, who has 192.168.15.4?" "192.168.15.4 lives on fd:02:11:22:33:44"
[07:10:13] <Haohmaru> yeah, but what happens if some device sends out packets addressed to my device's MAC address but with a different IP?
[07:10:27] <LeoNerd> Then it believes you are a router
[07:10:35] <LeoNerd> That's how routing works
[07:10:49] <Haohmaru> so, is that valid?
[07:11:00] <Haohmaru> and my device will get the packets?
[07:11:47] <LeoNerd> ... yes?
[07:12:06] <Haohmaru> ah, so the question is.. how will the first device assign the IP to the MAC if my device normally has a different IP
[07:12:08] <Haohmaru> duh
[07:12:16] <LeoNerd> Hm?
[07:12:34] <Haohmaru> suppose my device normally has IP 10.0.0.2 and some MAC
[07:12:51] <Haohmaru> but it also has another IP.. 10.0.1.5
[07:13:01] <LeoNerd> Then surely you just claim two addresses
[07:13:08] <Haohmaru> and another device wants to send packets to 10.0.1.5
[07:13:18] <Haohmaru> how is that done?
[07:13:28] <LeoNerd> How many addresses you have is surely irrelevant
[07:13:48] <LeoNerd> If someone wants to talk to 10.0.1.5 and thinks that's local (i.e. doesn't need to route), it will just ARP for it and see what comes
[07:14:13] <Haohmaru> ah, so my device has to respond to ARP requests for both IPs?
[07:14:31] <LeoNerd> If you want to claim to be two IP addresses, then yes
[07:14:45] <Haohmaru> okay, i see now
[07:15:05] <Haohmaru> then, the question is.. can uIP do this.. and i think it won't
[07:15:19] <LeoNerd> I've never heardof/seen/touched uIP
[07:15:39] <Haohmaru> because afaict it's meant for a single IP configuration
[11:46:24] <inductiveload> hypermagic, I seem to have got it working by erasing in one pass, and then programming with "-D"
[11:56:23] <aandrew> hm is there a good way to tell avr-libc that a char pointer can be indexed only within a range? https://www.tty1.net/blog/2008/avr-gcc-optimisations_en.html suggests a FIX_POINTER macro listed on the page but that blows the code up slightly
[11:56:38] <aandrew> using v4.8.1 avr-gcc
[12:47:45] <Chocobo> Hi all. I am using an xmega63d3 w/ the latest Atmel Toolchain. I noticed that iox64d3.h does not have a stucture defined for DAC_t, which is preventing the use of DACB. Is this is a bug or am I doing something incorrectly?
[12:48:56] <Chocobo> It looks like a bug to me.
[13:18:51] <hypermagic> Chocobo, these are bugs http://thefw.com/ugliest-insects-on-earth/
[13:21:27] <vsync> fuck xmegas
[13:22:09] <N1njaneer> Chocobo: You can always add one manually as per the datasheet if it's not in there.
[13:22:54] <N1njaneer> Chocobo: But if you're not TOO far in to the project, I would highly urge you to consider going towards Atmel's ARM offerings. The XMEGAs and AVR32 are both effectivel dead-end product series.
[13:24:53] <xrlk> yes ARM
[13:26:46] <xrlk> http://www.digikey.ca/product-detail/en/EFM32WG230F256-QFN64/914-1084-1-ND/3995848 I have this, what do I use to use it
[13:27:52] <N1njaneer> Probably a J-Link and any toolchain that can compile for ARM Cortex-M4
[13:28:25] <N1njaneer> Generally SiLabs pushes towards IAR Workbench, but it's $$$$ and honestly not nearly as nice as the completely free Atmel Studio. :)
[13:29:40] <hamnstar> part #avr
[13:29:55] <N1njaneer> SiLabs generally has great documentation and reasonably good support libraries from what I've worked with from their offerings so far.
[13:30:59] <N1njaneer> Does that help? :)
[13:31:03] <xrlk> yes
[13:31:08] <xrlk> thank you
[13:33:06] <N1njaneer> SiLabs may have a specifically-branded Segger JLink which is targetted to their products. That usually makes them way less expensive.
[13:33:32] <N1njaneer> The generic Segger J-Links are nice because they can target ANY ARM device, but you'll usually pay a couple hundred dollars for them :(
[13:33:47] <N1njaneer> Worth the investment if you do a lot of multiple-vendor ARM stuff, though.
[13:47:09] <hypermagic> vsync, what is problem with xmega?
[13:47:17] <hypermagic> they have dac...
[13:47:21] <hypermagic> and even system
[13:47:29] <hypermagic> and many pins
[13:47:33] <N1njaneer> hypermagic
[13:47:49] <vsync> um
[13:47:52] <N1njaneer> hypermagic: And a dead-end product series from Atmel. Old. Pricier.
[13:48:07] <vsync> no 5v tolerant io, adc is retarded, the whole line seems dead...
[13:48:20] <hypermagic> i was considering using them because of thedac and many pins and cheap and event system
[13:48:39] <hypermagic> wel i like 1.8-3.3v powering.
[13:48:43] <N1njaneer> hypermagic: Go over to Atmel's SAM series of parts, don't look back.
[13:48:47] <hypermagic> i prefer 1V8
[13:49:04] <vsync> i like powering with lower voltages aswell, sure
[13:49:06] <hypermagic> $5 for an xmega sounds all right
[13:49:16] <hypermagic> with dac...
[13:49:17] <N1njaneer> Still use AVR where possible if you already know the series well, but the newer SAM stuff absolutely kills everything else in the way of capabilities and price-point.
[13:49:18] <vsync> for USB you need to be in the 3v ballpark though
[13:49:25] <hypermagic> no i dont
[13:49:35] <vsync> and sometimes you want the freedom to interface it with 5v
[13:49:51] <hypermagic> but im not fan of the usb crap
[13:49:54] <vsync> go cortex-m0 or if you need even more bang go -m3
[13:50:05] <N1njaneer> vsync: These days you can generally keep nearly everything as 3.3V
[13:50:10] <hypermagic> what do those cost?
[13:50:15] <hypermagic> arm for $5 ?
[13:50:44] <hypermagic> nobody uses atmel arms in this country
[13:50:45] <vsync> that's true, N1njaneer but as it turns out i would have needed 5v io on a certain charger ic that i had readily available
[13:51:02] <vsync> hypermagic: at least stm's m3's are around $5 in 1-10 q
[13:51:10] <N1njaneer> hypermagic: More like $3.30 USD for a 48Mhz ARM in single quantity. They drop to around $1.50 at 5000 pieces.
[13:51:10] <vsync> or maybe $6
[13:51:23] <N1njaneer> For SAMD21E series
[13:51:27] <hypermagic> ninhmm, can you tip types?
[13:51:34] <hypermagic> N1njaneer,
[13:51:41] <hypermagic> and they have dac ?
[13:51:45] <vsync> yeah
[13:51:48] <vsync> I'd imagine
[13:51:57] <vsync> tldr, look at the datasheets
[13:52:08] <N1njaneer> hypermagic: There's dozens of different offerings. May have DACs, yes.
[13:52:17] <vsync> for what do you need the dac?
[13:52:23] <hypermagic> sounds cool instead of xmega at same price
[13:52:34] <hypermagic> vsync, for process control
[13:52:51] <vsync> do elaborate
[13:53:33] <hypermagic> a dac is really not that elaborate
[13:53:44] <hypermagic> it has a register input and an analog votlage output
[13:54:13] <vsync> aren't you the, "experienced c-coder, kinda meh in electronics", or how'd you put it?
[13:54:23] <vsync> no need to start getting smart, i obviously meant the process control
[13:55:19] <hypermagic> oh i meant industrial process control
[13:55:30] <hypermagic> not software process control obviously ...
[13:55:54] <hypermagic> you have a control loop and you want to control something with an analog voltage
[13:56:04] <hypermagic> with dac it is simple as outputting a value
[13:56:19] <vsync> oh yeah? geez, didn't know this. thanks.
[13:56:21] <hypermagic> otherwise you'd start pwming and lowpass filtering
[13:56:24] <vsync> the application i meant
[13:57:17] <hypermagic> it is trendy nowadays to use digital display and control in power supplies, so i will have that too for 1
[13:58:53] <vsync> so, a power supply.
[14:01:00] <hypermagic> and analog current voltage control
[14:01:26] <hypermagic> and sound output? ^^
[14:01:55] <hypermagic> if you want to drive a laser mirror
[14:06:54] <vsync> sounds industrial to me, legit
[14:07:17] <N1njaneer> What kind of a laser mirror?
[14:07:20] <vsync> an "experienced c-coder" is just the guy to rely on industrial power supply designing
[14:08:16] <hypermagic> ATSAM3N00AA-AU. is cool stuff?
[14:09:12] <hypermagic> vsync, i don't know what are you about
[14:09:25] <vsync> sure
[14:10:54] <hypermagic> i am not listing all of my projects now for the next 50 years
[14:11:19] <vsync> amen to that, brother.
[14:11:52] <vsync> hahaha. should get perhaps get on the topic of running arm with high voltage ac?
[14:12:01] <vsync> it's basically an industrial standard
[14:13:45] <hypermagic> if you quit trolling me and ask maybe i can help ?
[14:14:23] <vsync> sure, i can. the SAM3N00A doesn't have a dac
[14:14:37] <hypermagic> it has 1 i read the datasheet
[14:14:45] <hypermagic> but i'm looking into others too
[14:14:53] <hypermagic> so maybe i won't buy xmega :/
[14:15:21] <hypermagic> but i can't program atmel arm with atmega programmer
[14:15:31] <N1njaneer> Look at everything in the SAM series. The Atmel programmer is also only $35 USD and will do full JTAG and SWD for every part.
[14:15:33] <Tom_itx> you can if you get their new one
[14:15:39] <hypermagic> there is always complications
[14:15:57] <hypermagic> N1njaneer, i was looking at ones i can buy at tme for example
[14:16:08] <hypermagic> there is no point at choosing a device i can not buy
[14:16:27] <N1njaneer> They are nice parts. I've used them in a number of designs so far after using AVRs for more than a decade. Definately the nicer option for heavier lifting.
[14:17:46] <vsync> hypermagic: yeah, wonder which datasheet. It doesn't
[14:17:54] <hypermagic> hm
[14:18:10] <hypermagic> http://www.tme.eu/en/Document/10008903454fb0833253e6259b945887/ATSAM3N00AA-AU.pdf
[14:18:32] <hypermagic> – One 500 KSPS 10-bit DAC - only 1 though
[14:18:45] <N1njaneer> Tom_itx: Finally making cool metal pieces on our CNC!
[14:18:47] <hypermagic> but this costs the same as my atmegas
[14:19:09] <vsync> wonder how atmel.com begs to differ
[14:20:10] <vsync> oh well, that's a conflict. it says in the params it doesn't, and the table in the datasheet shows no dac, but then that is added in there
[14:20:33] <vsync> well, goes to show no wonder, atmel's bullcrap as usual
[14:21:33] <hypermagic> hm
[14:21:35] <hypermagic> confusion?
[14:21:35] <N1njaneer> What are you guys looking at? That datasheet is for the entire series. Some parts have the DAC, others do not.
[14:21:40] <N1njaneer> See table 1-1
[14:22:06] <hypermagic> how you store things on your arm ? they write most do not have eeprom
[14:22:21] <N1njaneer> All of the Cortex parts have on-board flash
[14:22:32] <N1njaneer> (or at least generally so)
[14:22:59] <hypermagic> sounds cool, so a tiny flash disc?
[14:22:59] <N1njaneer> You'd have to go up to something like the SAM5 series or the ARM9-series parts to go to external-based memories.
[14:24:29] <vsync> yeah, missed that part actually. It should say up to one dac, to be honest
[14:24:57] <vsync> well, it doesn't have a dac, but that's besides the point. back to doing something useful instead of this
[14:25:50] <hypermagic> vsync, partially answering your question and giving a solution you may be able to use a simple transformer and a votlage regulator ic like lm317? TS1117 to regulate power to your mcu ? or just use a ballast like in the cheap relay controllers that does not need isolated supplies and put a capacitor in serias a resistor and feed some zener diode clamped hold-up capacitor and add a regulator to it
[14:27:57] <hypermagic> N1njaneer, yea i see the summary now, that is a family datasheet linked not a device datasheet
[14:29:02] <hypermagic> so the dac costs $0.5 ...
[14:33:58] <hypermagic> vsync, the sam3n series has different core and io voltage btw, 1.8V / 1.8-3.6V that is good for usb.
[14:45:38] <vsync> hypermagic: no.
[14:46:07] <vsync> it's an industry standard, the sam series is well-known for its ac capabilities
[14:46:35] <vsync> it handles 110 and 220V regardless
[14:46:40] <vsync> you should try it
[14:46:53] <hypermagic> haha sounds like a bomb
[14:49:37] <hypermagic> N1njaneer, would you go with 100 pin device for prototyping?
[15:13:12] <hypermagic> Unique Identifier
[15:13:12] <hypermagic> Each device integrates its own 128-bit unique identifier. These bits are factory configured and cannot be changed by the
[15:13:12] <hypermagic> user. The ERASE pin has no effect on the unique identifier - haha great
[15:14:17] <N1njaneer> hypermagic: We lay out board for everything we use here, so we pretty much use whatever part fits best. I regularly use 100 and 144-pin leaded devices for Atmel and Xilinx in our designs :)
[15:14:50] <hypermagic> i usually feel like i could have more ios too
[15:15:23] <hypermagic> for example hooking up a 4x7 segment display with dots
[15:16:25] <hypermagic> (or larger)
[15:18:40] <hypermagic> N1njaneer, so the standard procedure is to add your own bootloader to your arm device and just upload that ?
[15:22:36] <N1njaneer> It depends on what you need the application to do.
[15:22:54] <N1njaneer> A bootloader is good if you need it field updatable, but if not, then there's no need for one.
[15:23:15] <N1njaneer> Atmel also has the SAM-BA bootloader that ships stock on the devices and is accessible via USB and serial, so if SAM-BA can do what you need it to, that's less work.
[15:23:29] <N1njaneer> Else you just load the image directly in to the device without a bootloader via JTAG and you're all set.
[15:23:52] <hypermagic> i have picked my xmega replacement, ATSAM3S1CB-AU
[15:24:13] <N1njaneer> Get yourself and ATMEL-ICE and you're all set.
[15:24:46] <hypermagic> nice, this has that bootloader too on usb full speed ?
[15:25:06] <N1njaneer> Full speed, but not high-speed.
[15:25:17] <hypermagic> i can wait 0.1 seconds
[15:25:30] <N1njaneer> But for transfering 1MB/sec the flash programming is going to be the bottleneck anyhow :)
[15:25:48] <hypermagic> :)
[15:25:59] <hypermagic> so i just hook this device up to my usb and program it ?
[15:26:18] <N1njaneer> I have a design here that I did that mounts the SDCard on the board as a volume on a host via USB connection. That's where the 1MB/sec transfer limit is kind of annoying, but it works fine for what we need.
[15:26:37] <N1njaneer> The ATMEL-ICE, yes. It's USB->JTAG/SWD/ISP/OneWire
[15:26:44] <hypermagic> cool thanks
[15:26:54] <N1njaneer> It will do all AVR and ARM parts from Atmel, but you'll need to be using Atmel Studio 6.2 or later
[15:27:25] <hypermagic> though i'd like something like avrdude
[15:27:25] <N1njaneer> If you are doing Linux development or something you'll need to look at using a Segger J-Link or equivalent, as Atmel Studio is only Windows.
[15:28:16] <hypermagic> http://www.atmel.com/tools/ATMELSAM-BAIN-SYSTEMPROGRAMMER.aspx
[15:28:21] <hypermagic> they offer some stuff for linux
[15:28:27] <N1njaneer> But if you're doing the ARM stuff I HIGHLY reccomend just using Atmel Studio anyhow, as the toolchain is free and is far nicer than something like a $5K copy of IAR Workbench, plus has tens of thousands of examples for every peripheral on every device they make with the ASF
[15:28:41] <N1njaneer> SAM-BA is the on-chip bootloader
[15:29:00] <N1njaneer> If you can use it, then yes, you don't need an external JTAG programmer, but it's advisable to have one on hand
[15:30:22] <hypermagic> i only have linux
[15:31:08] <hypermagic> i would not even try development on win anyway
[15:31:26] <N1njaneer> Smartest to use whatever is easiest and lets you deliver on time.
[15:32:23] <N1njaneer> Having worked with a dozen different toolchains over the year I can say that Atmel Studio is pretty much at the top for all embedded development stuff I'd ever want to use. It works fantastically and it's free.
[15:38:48] <hypermagic> can i make an sd card emulator and forwarder with this device @ 10MB/s ? ˇ^^
[15:40:01] <hypermagic> it looks pretty fast
[15:40:12] <hypermagic> ATSAM3S1CB-AU
[15:41:22] <N1njaneer> I would go to a faster part if you were going to try to do something like that -- SAM4x parts will go to 120 Mhz.
[15:41:33] <hypermagic> i had an idea of hacking some hardware that uses sd card
[15:42:03] <N1njaneer> Go for it
[15:42:40] <hypermagic> i was asking about speed though if i would want to record a live stream video that is being transmitted to the sd card
[15:43:15] <hypermagic> for anything other it does not really matter
[15:44:14] <hypermagic> it will be only fun project, nothing serious
[15:49:35] <inductiveload> hypermagic: how do you debug on linux? I've been trying all day with an attiny328p and jtagICE-mkII and I can't get anything sensible out of it
[15:49:54] <hypermagic> i don't debug
[15:50:23] <inductiveload> ah, right :-)
[15:50:24] <hypermagic> if i needed to debug i wrote a debug function
[15:50:46] <hypermagic> you can flash bits on led too if nothing available, or just store in eeprom and read it
[15:51:24] <inductiveload> right
[15:51:26] <hypermagic> i already had data communication functions on my device, so i used that
[15:52:31] <inductiveload> yeah, i previously did that with a UART and a FTDI UART/USB cable, worked OK
[16:06:22] <hypermagic> N1njaneer, i read that atmel bundles the bootloader as rom... so no need for other programer then, it is indestructible
[16:06:42] <N1njaneer> On some devices, yes.
[16:06:52] <N1njaneer> But it's still good practice to have a JTAG programmer avaliable.
[16:07:04] <hypermagic> and ofc makes reading of your code using the forensic tool much simpler
[16:08:05] <hypermagic> but lock bits were only there for ordinary users anyway
[18:19:14] <hypermagic> i like how the atmel arm device ATSAM3S contains separate pins for low power 32768Hz crystal and systemclock crystal
[18:19:48] <hypermagic> and it contains a Systick counter
[18:21:33] <N1njaneer> Yep, and often you only need the 32.768Khz crystal to get the full 48Mhz internal speed
[18:22:04] <hypermagic> this has 64MHz internal speed max
[18:22:30] <hypermagic> ds states it is defaulted to 4MHz startup internal rc core speed
[18:22:52] <hypermagic> the internal pll either use that or the xtal, but fine for me
[18:25:36] <N1njaneer> Yes, the PLL can take the 4Mhz up to 48Mhz or so, and then the PLL is trained via the 32.678Khz crystal reference
[18:28:56] <hypermagic> ATSAM3S1C - i read in the ds that it uses the rc osc or xtal as input
[18:29:13] <hypermagic> and they recommend 3-20MHz as main xtal for some reason
[18:29:34] <hypermagic> the 32768 Hz xtal osc is not wired to the PLL
[18:30:11] <hypermagic> but one still can be able to adjust the PLL according to the RTC in software
[18:30:24] <hypermagic> especially since there is the SysTick counter
[18:31:09] <N1njaneer> The PLL uses the 32Khz clock for training purposes.
[18:31:17] <N1njaneer> Or can, rather.
[18:36:26] <hypermagic> oh you mean internal startup automatic calibration at powerup? ;)
[18:36:45] <hypermagic> makes sense, if they state "precision rc oscillator"
[18:37:01] <hypermagic> but device does not contain a watch crystal
[18:37:41] <hypermagic> i use that in atmega too
[18:38:07] <hypermagic> i made a test and found that it was amazingly stable
[18:39:00] <hypermagic> and i only made a software RTC within
[19:04:01] <N1njaneer> No, the 32Khz crystal is required in order to discipline the PLL to take the 4Mhz internal RC oscillator up to 48Mhz or higher.
[19:04:10] <N1njaneer> You have to add one externally.
[19:04:36] <N1njaneer> But this prevents needing a much faster external clock crystal or clock source to the microcontroller, which also helps to cut down considerably on EMI
[19:27:49] <hypermagic> that is nice, one can always get a watch crystal from some clock thingy or a dead motherboard
[19:36:46] <Lambda-Aurigae> hypermagic, or an old watch
[22:53:24] <anonnumberanon> What is the arduino bootloader and how many days to write my own and how to write my own?
[23:06:41] <Valen> 7
[23:08:03] <Casper> it's actually easy
[23:08:03] <Casper> a bootloader is nothing more than a program
[23:08:04] <Casper> usually it will use the serial port
[23:08:06] <Casper> there is several ways to do it actually
[23:08:11] <Casper> you need to be able to make your bootloader detect that you want to program your chip
[23:08:26] <Casper> so you can check for a pin status (ex: if a button is pressed)
[23:08:47] <Casper> or wait for some data on the serial port, and if none is detected then jump to main code
[23:10:18] <Casper> so basically, you make a program that at start (check for a button, if pressed continue, if not jump to main code) or (init serial port, wait for data, if no data within x second then jump to main code, else continue the code)
[23:11:03] <Casper> then you get the data, find where it go in flash, erase the page, fill page buffer, issue page write, repeat
[23:11:17] <Casper> could write one probably within a day
[23:15:35] <anonnumberanon> Casper, is there a writeup or a tutorial or do I need to start from scratch? Will be using Linux, a cp2102-based little usb isp programmer and atmega328p
[23:16:51] <Casper> I don't have one on hand, but the datasheet explain how to write to flash and how to do the bootloader stuff, pay attention to the vector table, there is a way to make the avr use the vector table at the bootloader location instead of main one, usefull for interrupt