#avr | Logs for 2012-09-04

Back
[02:14:32] <sabesto> hm, messing with an attiny45v, put it in a small circuit and now it doesnt respond to the programmer
[02:15:41] <sabesto> anyone got any experience with what not to hook up to the ISP pins?
[02:25:12] <Casper> anything that will interfere with the programming
[05:19:16] <OndraSterver> RikusW, hello there
[05:19:23] <OndraSterver> you wrote that USB stack all in asm? :o
[05:23:18] <RikusW> Hi OndraSterver
[05:23:25] <RikusW> I did
[05:23:41] <RikusW> actually converter the atmel CDC stack
[05:23:47] <RikusW> mad it much smaller
[05:23:52] <Richard_Cavell> How's everyone doing?
[05:24:01] * Richard_Cavell is now the proud owner of 8 Atmel microchips
[05:24:07] <OndraSterver> RikusW, aka compiled in gcc and then rewrote?
[05:24:16] <RikusW> yes
[05:24:28] <OndraSterver> I see
[05:24:29] <RikusW> and removed all the non essential stuff
[05:24:42] <RikusW> from nearly 6kb to 800 bytes
[05:24:48] <OndraSterver> lol
[05:24:59] <OndraSterver> yes, it is very universally written
[05:25:41] <Richard_Cavell> You coded a USB stack in 800 bytes? Awesome!
[05:25:49] <RikusW> yes
[05:26:03] <OndraSterver> why not... write it all on your own? :D
[05:26:05] <OndraSterver> jk
[05:26:08] <OndraSterver> or am I!
[05:26:21] <RikusW> easier to cheat :-P
[05:26:26] <OndraSterver> that is shorter than my LED display interrupt routine!
[05:26:30] <OndraSterver> that was almost 1kB :P
[05:26:38] <OndraSterver> the rest was another 1.2kB or so
[05:26:44] <RikusW> the usb specs are nearly impossible to understand without some demo source...
[05:26:49] <OndraSterver> yep
[05:27:05] <OndraSterver> but mega's USB is simpler than xmegas, isn't it?
[05:27:18] <RikusW> not sure, ask abc
[05:27:23] <OndraSterver> ah
[05:27:28] <Richard_Cavell> What is the principal difference between a tiny and a mega AVR?
[05:27:32] <OndraSterver> size
[05:27:46] <RikusW> the u2 and u4 differ slightly, mainly the regulator config register iirc
[05:28:25] <RikusW> Richard_Cavell: and pincount too, and only t2313 does have a uart
[05:28:38] <Richard_Cavell> Sorry you have to help me a bit more. What are u2 and u4?
[05:28:39] <OndraSterver> doesn't it have USI?
[05:28:50] <OndraSterver> bloody USI
[05:28:52] <RikusW> it does, but thats just painful
[05:28:54] <OndraSterver> nobody likes USI
[05:29:02] <RikusW> maybe for SPI
[05:29:07] <RikusW> but not uart
[05:29:10] <RikusW> its messy
[05:29:23] <OndraSterver> the difference between SPI in USI and software SPI is almost none :D
[05:29:27] <RikusW> Richard_Cavell: atmega32u2 / u4
[05:29:27] <OndraSterver> almost the same code lol
[05:29:44] <RikusW> there was supposed to be a u6 too, its eol
[05:30:12] <OndraSterver> I want xmega256a1eu with 144pin QFN or TQFP :P
[05:30:13] <RikusW> and then at90usb64 / 128
[05:30:25] <Richard_Cavell> Is there an AVR with more than 100 pins?
[05:30:26] <OndraSterver> but there are no "e"
[05:30:29] <OndraSterver> no
[05:30:39] <RikusW> I have at32uc3a3256 :) on a xplain board, cost $29
[05:30:46] <RikusW> hi speed usb :-D
[05:30:51] <OndraSterver> that is different class though :D
[05:30:54] <specing> I wonder how many transistors there are in e.g. tiny2313
[05:31:03] <OndraSterver> try microscope
[05:31:06] <OndraSterver> and hammer :)
[05:31:07] <RikusW> havent actually used it yet
[05:31:15] <RikusW> or ask atmel ?
[05:31:28] <OndraSterver> I like my way much more
[05:31:41] <RikusW> HNO3 + heat is better
[05:31:46] <OndraSterver> it will be a lot. But not that much compared to486 for example
[05:31:56] <RikusW> the die will actually be in one piece afterward
[05:32:05] <Richard_Cavell> Does anyone know if they are microcoded?
[05:32:09] <OndraSterver> although... 486 could be similar
[05:32:13] <OndraSterver> no, they are not, Richard_Cavell
[05:32:24] <OndraSterver> 1219, time to get up
[05:32:26] <Richard_Cavell> Does that apply to all AVR eight bits?
[05:32:29] <RikusW> probably not
[05:32:30] <OndraSterver> yes
[05:32:35] <OndraSterver> I am fairly certain of it
[05:32:45] <RikusW> since most instructions is 1 clock
[05:33:11] <Richard_Cavell> So what's technology would you like to see introduced into AVR?
[05:33:25] <specing> ethernet
[05:33:42] <RikusW> at32uc does have that
[05:33:50] <specing> 8-bit ethernet!
[05:33:58] <RikusW> and you could use 28enc60 ?
[05:34:11] <specing> that is an extrenal chip ;_;
[05:34:14] <Richard_Cavell> I don't think that AVR eight could handle ethernet
[05:34:21] <RikusW> or and realtek ISA 8019
[05:34:29] <Richard_Cavell> It would have to be interrupts driven, wouldn't it?
[05:34:53] <RikusW> specing: even avr32 need external phy chips
[05:35:03] <RikusW> mac too iirc
[05:36:40] <specing> :(
[05:36:56] <specing> there are PICs (8 bit) with integrated phys
[05:37:19] <Richard_Cavell> Or you could bitbang to simulate external chips.
[05:37:26] <specing> If a 10 MIPS PIC can handle 10M ethernet...
[05:37:51] <specing> then Im sure a 64MIPS xmega could handle 100M ethernet...
[05:38:01] <specing> just saying'
[05:39:34] <OndraSterver> 64MIPS xmega? :)
[05:39:40] <OndraSterver> you want atmel to certify them forMHz? :)
[05:40:03] <OndraSterver> for 64MHz
[05:40:41] <specing> you said they can run there no probs.
[05:40:56] <specing> Its like the flash/eeprom erase cycles
[05:41:06] <specing> they specify the minimum endurance
[05:41:16] <specing> so the minimum an xmega can do is 32MHz
[05:41:26] <specing> they don't specify the maximum
[05:45:28] <OndraSterver> yes
[05:45:34] <OndraSterver> I said that at 80MHz the LED was still blinking
[05:45:37] <OndraSterver> I didn't test anything else
[05:50:41] <specing> :)
[05:50:52] <specing> You also said that the peripherals have their own clocks
[05:50:59] <specing> so they would still work
[05:56:26] <OndraSterver> you can set prescalers to them, yes
[05:59:26] <OndraSterver> kind of set prescaler
[05:59:30] <OndraSterver> the "map" of them looks weird
[05:59:33] <OndraSterver> like it has been reversed
[05:59:51] <OndraSterver> http://clip2net.com/s/2gEvG
[06:00:05] <OndraSterver> which would mean that some peripherals run at higher speeds than core only
[06:00:08] <OndraSterver> not slower
[06:18:42] <specing> http://cdimage.debian.org/debian-cd/6.0.5/amd64/iso-cd/
[06:18:46] <specing> Lolololol 53 CDs
[06:31:28] <Richard_Cavell> specing: Is there an AVR port of debian?
[06:31:33] <Richard_Cavell> It wouldn't work on the 8-bit one, would it?
[06:33:59] <specing> Richard_Cavell: you can run an armv5tel emu on a mega and run debian off that
[06:34:13] <Richard_Cavell> It's not the same
[06:34:33] <Richard_Cavell> You could run an x86 emulator and run debian off it as long as it's Turing complete
[06:34:50] <specing> I guess you could cross-compile Linux for AVR
[06:34:58] <specing> and supply all the arch/ files
[06:37:05] <OndraSterver> you could not
[06:37:21] <OndraSterver> how many reasons do you need?
[06:37:28] <OndraSterver> or want
[06:39:17] <OndraSterver> too bad I don't have that 16MB DRAM he had
[06:39:22] <OndraSterver> I would run it on 64MHz xmega :P
[06:39:29] <OndraSterver> he is running it on 16MHz mega
[06:39:32] <OndraSterver> that is 4 times the clock!
[06:39:37] <OndraSterver> and some more instructions
[06:39:41] <OndraSterver> it could be further optimized
[06:41:08] <specing> yep, external ram
[06:41:18] <specing> it could be massively optimized
[06:41:24] <specing> no dram refresh interrupt,...
[06:43:29] <OndraSterver> well, if you had xmegaa1u
[06:43:34] <OndraSterver> but I don't have board with that yet :)
[06:43:51] <OndraSterver> refreshing DRAM on 32MHz takes really few % of CPU
[06:43:55] <OndraSterver> at 8MHz it was 10%
[06:43:59] <OndraSterver> at 16MHz it would be 5%
[06:44:03] <OndraSterver> at 32MHz 2.5% :)
[06:44:10] <Richard_Cavell> Does the CPU have to refresh DRAM in software?
[06:44:12] <OndraSterver> now overclock it to 64MHz and you are at 1.25%
[06:44:18] <OndraSterver> on non-EBI xmegas yes
[06:44:20] <OndraSterver> on EBI xmegas no
[06:44:23] <Richard_Cavell> crikey
[06:44:23] <OndraSterver> it is hardware
[06:44:29] <Richard_Cavell> How often?
[06:44:31] <OndraSterver> XBoard Ultra is planned, yes
[06:44:38] <OndraSterver> 64ms or 16ms, depends on memory
[06:44:50] <Richard_Cavell> So you have to set up an interrupt?
[06:45:05] <Richard_Cavell> And go through the whole RAM?
[06:46:00] <specing> yes
[06:46:19] <Richard_Cavell> I guess it takes longer the more RAM you have
[06:46:35] <specing> Richard_Holmes.
[06:47:04] <Richard_Cavell> Yes indeed
[06:47:21] <Richard_Cavell> Is it possible that some other interrupt will pre-empt the refresh interrupt and spoil the refresh?
[06:47:47] <Richard_Cavell> I don't trust any memory that has to be refreshed every 16 ms. Imagine if you had a relative like that. You'd have to refresh their memory every 16 ms
[06:47:56] <OndraSterver> <Richard_Cavell> And go through the whole RAM?
[06:47:57] <OndraSterver> no
[06:48:08] <OndraSterver> check out self-refreshing
[06:48:12] <OndraSterver> (on internet)
[06:48:17] <OndraSterver> and it is 64ms for most of the memories
[06:48:24] <OndraSterver> like I said
[06:48:30] <OndraSterver> on 8MHz MCU it does 10% load
[06:48:50] <OndraSterver> I don't think it could have been optimized further... :)
[06:48:59] <Richard_Cavell> Have a separate chip to do it!
[06:49:04] <OndraSterver> how?
[06:49:15] <OndraSterver> you'd have to be sure that the mega isn't reading or writing to the memory at that moment
[06:49:20] <OndraSterver> and time it properly
[06:49:24] <OndraSterver> like I said
[06:49:28] <OndraSterver> 10% on 8MHz is not bad
[06:49:32] <OndraSterver> or just wait for my XBoard Ultra
[06:49:35] <OndraSterver> with 16MB SDRAM :)
[06:49:39] <OndraSterver> no software refreshing
[06:49:53] <OndraSterver> just configure few registers, tell xmega to use all 16MB space and boom, done
[06:49:53] <Richard_Cavell> Like I said, is it possible for another interrupt to pre-empt the refresh interrupt?
[06:50:00] <OndraSterver> ?
[06:50:10] <OndraSterver> there is quite a tolerance
[06:50:19] <OndraSterver> I found out they can last almost 1 second before they discharge :D
[06:50:23] <Richard_Cavell> You could have a second AVR to manage the bus and force the first one to wait for a refresh, or delay the refresh
[06:50:25] <OndraSterver> at least the one I had
[06:50:33] <OndraSterver> you could
[06:50:47] <OndraSterver> or use something with external interface
[06:50:51] <OndraSterver> xmega128a1u is not expensive
[06:50:53] <Richard_Cavell> On the Amiga, that's what they had. The bus was managed and only one chip could access it at one time. The others had to wait.
[06:50:53] <OndraSterver> it is about $5
[06:51:28] <OndraSterver> $5.32/1pcs
[06:51:32] <OndraSterver> awfuly cheap
[06:51:40] <OndraSterver> 100PCs at $2.97
[06:51:42] <OndraSterver> wow
[06:51:48] <OndraSterver> that is MUCH cheaper than mega256a3u
[06:52:20] <Richard_Cavell> I still haven't started with my tiny85s
[06:52:23] <Richard_Cavell> Only got them in the mail today
[06:52:46] <OndraSterver> then go started with them :P
[06:52:56] <Richard_Cavell> I have to wait for the STK600 to arrive
[06:53:06] <specing> why?
[06:53:13] <specing> 3 diodes, 3 resistors, serial port
[06:53:19] <specing> 10b/s programmer!
[06:53:39] <specing> probably much more if you have a hardware serial port
[06:55:47] <OndraSterver> lol
[06:56:31] <specing> Thats how I bootstraped the USBtinyISP
[06:56:38] <specing> took like 10 minutes to flash it
[07:01:37] <OndraSterver> ll
[07:01:38] <OndraSterver> lol
[07:13:25] <OndraSterver> hmm
[07:13:34] <OndraSterver> I should (could) try out my old 320x480 display I have got here
[07:13:37] <OndraSterver> but never got working :/
[07:13:47] <OndraSterver> I do wonder whether it is because I burnt it or it was DOA or what
[07:13:53] <OndraSterver> or because I just had wrong init sequence
[07:14:08] <OndraSterver> I hope I still have datasheet for it somewhere
[08:13:30] <OndraSterver> hmm
[08:13:37] <OndraSterver> megal0maniac and Corwin wanted each one xboard
[08:13:39] <OndraSterver> but they are not here :D
[08:28:59] <chris_99> hi peeps, is the AVR Dragon a good programmer for programming virtually all the AVRs?
[08:29:53] <district> yep
[08:30:43] <chris_99> sweet, i'll probably just get that then, as its the same price as the PICKIT
[08:32:52] <OndraSterver> it lacks support for TPI right now
[08:32:55] <OndraSterver> aka those tiniest attiny
[08:32:58] <OndraSterver> aka tiny4, 5, 9
[08:33:01] <OndraSterver> and some more
[08:33:08] <OndraSterver> stuff like atmega8 will be supported again very soon
[08:33:15] <OndraSterver> (those old devices)
[08:33:46] <chris_99> oh interesting OndraSterver what would i need to progrma them
[08:33:46] <specing> or get a mega16u2 board for $10
[08:34:32] <specing> chris_99: rikusW and Tom_itx sell programmers
[08:34:49] <chris_99> yeah i believe the Tom_itx one doesn't support 32 bit though?
[08:35:01] <chris_99> or am i mistaken
[09:18:11] <OndraSterver> it is avr isp mkii clone, chri
[09:18:14] <OndraSterver> oh he is gone
[09:18:21] <OndraSterver> does the 99 mean the year he was born?
[09:18:23] <OndraSterver> did*
[09:18:24] <OndraSterver> who knows!
[09:18:39] <specing> he is still in ##pic
[09:18:44] <OndraSterver> ah
[09:18:51] <OndraSterver> are you there? :D
[09:18:59] <specing> Im the founder
[09:19:23] <OndraSterver> lol
[09:19:50] <specing> ##pic is the result of me running around freenode looking for PIC help ~4 years ago
[11:06:39] <OndraSterver> !seen Corwin
[11:06:39] <tobbor> Corwin was last seen in #avr on Sep 01 09:35 2012
[11:06:42] <OndraSterver> !seen megal0maniac
[11:06:42] <tobbor> megal0maniac was last seen in #avr on Sep 03 13:58 2012
[11:06:46] <OndraSterver> !time
[11:06:46] <tobbor> My watch says its 08:57 Tue Sep 04 2012
[11:06:57] <OndraSterver> fix your clock, tobbor
[11:07:01] <OndraSterver> !timezone
[11:07:03] <OndraSterver> !time timezone
[11:07:04] <tobbor> My watch says its 08:57 Tue Sep 04 2012
[11:07:19] <OndraSterver> you have got -8:58 from me
[11:07:25] <OndraSterver> let's call it -9
[11:07:41] <OndraSterver> why does it use 24 hour clock when it is made in USA?
[11:07:44] <OndraSterver> !seen abcminiuser
[11:07:44] <tobbor> abcminiuser was last seen in #avr on Sep 02 02:09 2012
[11:10:25] <_raven_> (how) is possible to run rs485 via subd 9pin serial interface on a linux machine?
[11:11:00] <_raven_> id like to controll the micro using 485
[11:11:07] <OndraSterver> does your micro have 485?
[11:11:13] <OndraSterver> and does your PC have 485? :)
[11:12:25] <_raven_> i have drivers for the micro-pcbs yes and some people told me it would be possible to run 485 on the same hardware 9pin without special hardware
[11:12:41] <Kevin`> _raven_: it wouldn't be proper according to spec, since rs-485 uses differential signalling, unless you use a driver chip. you could connect it various ways though. the uart is exactly the same of course
[11:13:45] <_raven_> i know but some people told me the pc-controller would be able to handle both signalling standards?
[11:13:47] <Kevin`> I recommend getting a driver chip or even a premade adapter board. shouldn't be more than a few $ either way, and no fiddling with anything except the protocol handling.
[11:14:07] <Kevin`> not that i'm familiar with
[11:14:32] <Kevin`> some computers of course do have those line drivers, but most i've seen, and the standard pc, does not
[11:16:40] <_raven_> ok then the other way would be to connect a micro via usb/ftdi and to use it as translator - are there any kind of libraries you know about which can do some sort of translation? or do i have to do it on my own?
[11:17:44] <Kevin`> _raven_: I don't see the use in using a microcontroller for this, unless you also want to make it speak some higher level protocol "transparently" for you
[11:18:09] <Kevin`> _raven_: the uc has the same sort of uart as the pc, and you'd need rs-485 line drivers for it anyway
[11:18:17] <_raven_> i want a rs485 bus connection with some of them
[11:18:32] <_raven_> yes i have theese line drivers
[11:18:42] <Kevin`> so connect them to your fdi or rs232 port
[11:18:45] <_raven_> its only the question how to connect it to the controller pc
[11:20:11] <_raven_> ok but still i need a hardware/software translation
[11:20:13] <Kevin`> rs-485 uses the same logical signalling as rs-232, just the bus is different
[11:20:37] <Kevin`> the higher level stuff for multi-system contention is out of scope for both standards
[11:20:40] <_raven_> ok so i just have to do the peak adjustment?
[11:20:43] <Kevin`> and will be in software on the pc
[11:21:10] <Kevin`> _raven_: the driver is differential, and needs to be able to be tristated, but in general i'd say "yes"
[11:21:16] <_raven_> to adjust the physical levels?
[11:22:12] <Kevin`> _raven_: http://en.wikipedia.org/wiki/File:RS-485_waveform.svg
[11:30:04] <karlp> _raven_: if you are on linux, and have a new enough kernel, and have an appropriate 485 transceiver connected to the rs232 lines, you can use dtr/rts to control the tx_enable/rx_enable pin on the transceiver
[11:30:22] <karlp> and you can set flags on the serial port and use ioctls to say "this port is actually in 485 mode"
[11:30:31] <karlp> and it will mostly just work for you.
[11:31:36] <karlp> unless you need specifc setup/hold times, you can even just let linux keep thinking it's rs232, and hook dtr directly to tx enable, and it "just works"
[11:32:14] <karlp> even on old kernels and windows
[11:32:30] <_raven_> ok tnx
[11:32:34] <_raven_> ill look for it
[11:33:00] <karlp> what are you doing with it?
[11:33:45] <_raven_> talking to some micros on the 485 bus
[11:34:38] <karlp> that's very open ended :)
[11:35:39] <_raven_> for example to read some sensors in the house :)
[11:40:16] <Kevin`> _raven_: your own micros? if so, open ended is fine, since you'll define the rest of the stuff later in your own unique standard ;)
[11:42:23] <_raven_> its planned to define it myself right
[11:44:02] <_raven_> its just to play around with it a bit ;)
[12:02:03] <r00t|home> re rs485: the problem is that the standard 16550 uart in PCs can't handle the baudrates commonly used by rs485
[12:02:37] <r00t|home> so while you can even buy rs232<->rs485 level shifters, they are useless on normal pc uart ports
[12:03:18] <r00t|home> the ftdi chip can handle the rates, for example... but it can not (without low-level polling crap) handle 9 data bits per frame, as commonly used in rs485
[12:03:54] <_raven_> but the rates are a software issue isnt it??
[12:04:17] <r00t|home> no, the hardware clock generator in the standard uart can't generate the baudrates
[12:04:50] <r00t|home> if you have a more advanced uart that is not in 16550 compatibility mode, it's ofcourse possible... but i have not seen such a thing
[12:05:17] <_raven_> i am not sure
[12:05:59] <r00t|home> you can for example send DMX (the lighting control protocol) using an ftdi chip diretly from a pc, as it uses only 8 bits per frame
[12:06:29] <_raven_> i only see both numbers 8250 and 16550a in dmesg - which is the "real" chip?
[12:06:30] <r00t|home> but most rs485 _BUS_ systems use the 9th data bit to separate addresses and data
[12:07:02] <r00t|home> the real chip... it's integrated in your chipset (southbridge) usually
[12:07:22] <r00t|home> in older times it was integrated in "super io" chips that handled all the standard ports in a pc
[12:07:58] <r00t|home> those chips are ofcourse not original 16550s, but i don't think they have extra features... try reading the datasheets ;)
[12:08:13] <karlp> r00t|home: define "baud rates commonly used by rs485" :)
[12:08:28] <karlp> just because old scsi 1 harddrives did rs485 at megabits doesn't mean every rs485 use is high speed
[12:08:46] <r00t|home> r00t|home: higher and less odd than what's used on rs232... like 250kbit, 500kbit...
[12:08:52] <_raven_> i do but i cannot find anything useful instead of "perhaps mode is set by jumper" ^^
[12:09:03] <r00t|home> those are used by dmx and martin light control bus (which i personally use)
[12:09:39] <r00t|home> karlp: the problem is not even that the rates are too high, but that the clock generators will only do multiples of 9600 an such
[12:09:45] <karlp> modbus however, is 19200, so you can bash whatever you like.
[12:10:01] <r00t|home> and also only 8 bit?
[12:10:06] <r00t|home> so those adapters might have a use there, then
[12:10:23] <karlp> unless you're making up baud rates for fun, you're not going to have a problem.
[12:10:41] <karlp> r00t|home: 8, plus parity,
[12:10:47] <karlp> so "9" depending on who's counting.
[12:11:31] <karlp> avr you configure for 8 bit, stm32 you configure for 9 bit.
[12:11:39] <r00t|home> martin uses 9n2, so you can use the parity bit to simulate the 9th bit, but it's inefficient to do over usb
[12:11:43] <r00t|home> avr can do true 9bit
[12:12:35] <r00t|home> well, ok, so modbus can run on a 16550... but not those i have used
[12:13:08] <karlp> modbus runs very happily on a usb ft232 with a driver chip hanging off it.
[12:15:06] <r00t|home> the ftdi will even do 250kbit, just only data 8 bits per frame
[12:16:40] <r00t|home> *8 data
[12:20:09] <karlp> I don't particularly care how it does it, but it does 8-n-1 and 8-e-1 and 8-n-2 just fine with the modbus devices on my desk
[12:24:00] <r00t|home> cool stuff
[12:24:49] <r00t|home> and i'm using a mega with two uarts to convert rs232 buadrates at 8n1 to rs485 9n2 at 250k
[12:25:31] <karlp> aren't we all :)
[12:25:55] <r00t|home> (which is a horribly flawed, as both clocks need to be derived from the same base)
[12:26:06] <karlp> I have an stm32 doing 7e1 at 300baud (ascii) into 8-e-1 at 19200, that then all goes over ethernet anyway
[12:26:37] <r00t|home> no overkill at all there!
[12:26:38] <karlp> the joys of connecting things made by different people with different standards bodies
[12:27:15] <karlp> stm32 was cheaper than an avr with 2 uarts
[12:27:48] <r00t|home> creepy
[12:28:04] <r00t|home> so your uart->ethernet converter doesn't do 7bit?
[12:29:26] <karlp> well, not quite that simple. linux soc with a rs485 port going out to the stm32 doing the translations,
[12:29:53] <karlp> then an app on the linux side that reads off the modbus and does a bunch of other stuff before reposting it on the ethernet side
[12:32:16] <r00t|home> and the 7bit part?
[12:32:36] <karlp> the other side of the stm32.
[12:32:48] <karlp> the non-modbus part :)
[12:33:07] <karlp> 300baud is awesome. especially for an ascii protocol.
[12:35:22] <r00t|home> i mean, what is connected there? that made the conversion necessary
[12:35:42] <karlp> oh, smart meters.
[12:36:13] <karlp> one of the iec protocols for IR comms is 300baud 7e1
[12:36:46] <r00t|home> <-- is on #volkszaehler.org ;)
[12:37:20] <r00t|home> who do open software and hardware for reading smartmeters
[12:38:04] <karlp> yeah, smartmeters are only one poitn though, so not very interesting :)
[12:38:15] <r00t|home> so you use the stm to get the meter data onto your modbus, not _only_ for baudrate/format conversion
[12:38:38] <karlp> the stm is meterdata to modbus, yes.
[12:42:38] <Essobi> I havn't seen any circuit reguarding use for the iec protocols... or much documentation on them yet.
[12:42:48] <Essobi> *circuits
[12:43:23] <Essobi> I'm interested in building one since I've got a linux SOC that runs RS232/485/422/ethernet to wire up to my house.
[12:44:56] <karlp> Essobi: there's lots. depends what device you're connecting to.
[12:45:14] <xpololz> hmm, if I communicate with my PC through a TTL-USB adapter, does this adapter have UART implemented in the IC or is it in the PC? Also I'd need some driver to read the data from USB on Linux?
[12:45:16] <karlp> they basically took a whole pile of different ways,m called them subsection a,b,c,d,e,f of the same standard,
[12:45:18] <Essobi> karlp: I have one at home.. no idea which standard it runs on yet thou, I'll look.
[12:45:26] <karlp> and they're not compatible
[12:45:37] <Essobi> karlp: ah.
[12:45:46] <karlp> oh, and it's not super likely that it will be written anywhere what format it is.
[12:45:51] <Essobi> karlp: yea, I'll take a peek when I get home.
[12:46:03] <karlp> the smart meter vendor may or may not answer your questions :)
[12:46:06] <Essobi> karlp: Then I can try them ALL? :D
[12:57:21] <r00t|home> xpololz: the "ttl-usb" contains an usb-attached uart (like the ftdi ft232), which linux has a driver for, and it appears as /dev/ttyUSBx
[13:01:58] <xpololz> alright :)
[13:05:03] <r00t|home> in case of the ftdi, if you need to access the ftdi's special features that the linux driver does not expose (special baudrates, bitbang-mode, ...), there's a libusb-based userspace "libftdi" driver
[13:07:23] <xpololz> hmm was trying to understand how this communication link worked :D and I imagined it as follows: an UART on MCu communicated with UART on the TTL-USB adapter, and then the TTL-USB adapter would signal the USB accordingly and a driver would read the signals from PC...
[13:15:33] <_raven> i just found a max211eca line driver on the serial interface would this fit with the 485 specs?
[13:26:14] <r00t|home> guess what, the 485 driver is called max485
[13:27:17] <r00t|home> http://www.ti.com/lit/ds/symlink/max211.pdf => rs232
[13:28:11] <r00t|home> _raven: to do rs485 with an rs232 port, you connect an rs232=>ttl and then ttl=>rs485 driver...
[13:28:51] <r00t|home> or you remove the 232 driver from your uart, or use one that never had a 232 driver, and connect a 485 driver... or use one that comes with a 485 driver
[13:29:27] <r00t|home> you can get an ftdi usb=>rs485 interface for ~$10 on ebay
[13:30:45] <r00t|home> _raven: rs485 is fundamentally different from 232 as it uses differential signaling... so you have two wires per data line (usually just one, which is used for both rx and tx, half-duplex)
[13:38:27] <karlp> _raven: silabs make a much cheaper part than the max485 and the ti reference parts, if you're interested.
[13:41:38] <xpololz> r00t|home, did I get it wrong? :-s
[13:58:46] <_raven> just for interest: in bios i have a option to run com port 2 as irda and askir - does anyone know what this does? infrared line-driver directly or different logic?
[14:50:36] <mnemoc> hi, using avrdude, how can I backup "everything" from the MCU of one board to another identical?
[14:51:52] <mnemoc> or it has to be done memory type by memory type?
[14:52:03] <LoRez> latter
[14:54:06] <mitsakos> hello there, i'm reading atmega168 datasheet for Slave SPI use. It says "When a serial transfer is complete, the SPIF Flag is set" how the slave device knows that the serial transfer is complete? maybe by the SS pin?
[14:56:58] <Tom_itx> every byte i think
[14:57:19] <mitsakos> yes but if it is the slave how does it know when a byte comes?
[14:57:28] <mitsakos> *a byte received
[14:58:34] <Tom_itx> the master clocks it
[14:58:49] <Tom_itx> the slave should be ready when SS is asserted
[14:59:56] <mitsakos> so SS defines the start of the byte transmission and the end of it
[15:00:52] <Tom_itx> the master should know what the slave requires and when it's data packet is complete
[15:01:12] <Tom_itx> it will generally send a final 0xFF to flush the buffer
[15:03:28] <mitsakos> how the slave device knows that a serial reception has been completed?
[15:04:21] <Tom_itx> like i said, the master should know what each slave requires
[15:04:26] <Tom_itx> and when it's done
[15:04:35] <Tom_itx> the slave does what it's told
[15:04:55] <Landon> did I wander in at the wrong time?
[15:05:47] <Tom_itx> would there be such a thing?
[15:05:57] <mitsakos> if you have two avr's one Master one Slave. The Master sends a byte to Slave. How the Slave will know that the byte is just received so he has to read it before other bits come to overwrite it
[15:06:31] <mitsakos> Datasheet says that the SPIF is set when the transfer complete. When the transfer completes for the Slave device?
[15:07:01] <Tom_itx> yes
[15:07:30] <mitsakos> When does the transfer completes for the Slave device? When occures what?
[15:07:40] <Tom_itx> read the data sheet
[15:07:44] <Tom_itx> it varies
[15:07:52] <mitsakos> when SS pin is driven high?
[15:08:14] <mitsakos> no it doesn't varies
[15:08:15] <Tom_itx> that would be one
[15:08:22] <mitsakos> we have a specific situation
[15:08:26] <mitsakos> the device in Slave mode
[15:08:34] <Tom_itx> but if it went high prematurely the master would miss data
[15:08:52] <mitsakos> the SPI clock runs all the time from the MASTER
[15:09:06] <mitsakos> so when no data transfered zeros are shifted
[15:09:14] <mitsakos> from Master to Slave and from Slave to Master
[15:09:36] <mitsakos> when master sents a byte has to inform Slave that know comes a byte
[15:09:46] <mitsakos> so that the Slave can read it
[15:09:56] <mitsakos> right?
[15:10:42] <Tom_itx> basically yes
[15:10:54] <Tom_itx> with the SS line
[15:11:24] <mitsakos> so basically if you have always the SS grounded the SPIF will never be one
[15:11:29] <mitsakos> *be set
[15:11:43] <Tom_itx> bbl
[15:11:50] <mitsakos> bbl?
[15:12:01] <Tom_itx> later..
[15:12:11] <mitsakos> okz
[15:21:06] <karlp> mitsakos: normally the spi clock _doesn't_ run all the time,
[15:21:13] <karlp> it only runs while data is being transferred
[15:25:41] <OndraSterver> which is bugger sometimes :/
[15:31:57] <mnemoc> hi, I was asked to reflash a board with an ATXMEGA128A3 MCU with a avrispmkII programmer, but `sudo avrdude -cavrispmkII -px128a3 -P usb -v` on the board I have locally failed with "error in CMD_XPROG_SETMODE: Unknown" (http://dpaste.com/796452/) and another remotely dies with "error in CMD_XPROG: Collision" (http://dpaste.com/796451/) ... the first is avrdude 5.11.1 and the latter 5.10... both on ubuntu with unmodified avrdude.conf.... any idea what may I be doing wr
[15:34:56] <megal0maniac> !seen RikusW
[15:34:57] <tobbor> RikusW was last seen in #avr on Sep 04 03:58 2012
[15:35:08] <megal0maniac> Ah, so he is around
[15:35:45] <karlp> OndraSterver: why would that cause a problem?
[15:35:53] <megal0maniac> OndraSterver: Hey, someone else uses the atxmega :P
[15:38:24] <OndraSterver> mnemoc, hello there :)
[15:38:37] <OndraSterver> megal0maniac, so, do you want one XBoard coco? :P
[15:38:49] <mnemoc> OndraSterver: hi :)
[15:39:05] <mnemoc> megal0maniac: is it a known problem?
[15:39:40] <megal0maniac> mnemoc: Not that I know of, but OndraSterver is the person you want to speak to about atxmegas. Not sure about avrdude, though...
[15:39:57] <OndraSterver> I got mine xmega working with Dragon
[15:40:04] <OndraSterver> by adding 22pF capacitor between clock and ground
[15:40:45] <megal0maniac> OndraSterver: Yes, but only when I can afford it ;)
[15:41:10] <OndraSterver> does that mean that you are a poor student? :D
[15:41:15] <specing> ohi mnemoc
[15:41:32] <megal0maniac> Do we have something in common? :P
[15:42:01] <OndraSterver> that depends
[15:42:04] <OndraSterver> are you poor student? :D
[15:42:13] <megal0maniac> I am
[15:42:30] <OndraSterver> oh
[15:42:34] <OndraSterver> yes, we have that in common then :D
[15:42:46] <xpololz> hmm, no 22pF capacitor's for poor students? :-(
[15:42:50] <OndraSterver> lol
[15:43:05] <specing> mnemoc: you probably have connections problems between the programmer and the xmega
[15:43:49] <OndraSterver> I found as6 to be useful for error codes just as blonde trying to drive manual car without knowing what is a clutch good for
[15:44:02] <megal0maniac> What is the actual difference between SPI and PDI? They seem interchangable...
[15:44:10] <OndraSterver> nope
[15:44:16] <OndraSterver> PDI is PROGRAMM & DEBUG INTERFACE
[15:44:19] <megal0maniac> OndraSterver: I like as6 for the fuses
[15:44:21] <OndraSterver> plus it is bi-directional
[15:44:27] <OndraSterver> I like as6 for fuses and programming and debugging
[15:44:35] <OndraSterver> but when it spits out some error it tells you exactly nothing
[15:44:54] <megal0maniac> That seems to be common of computers
[15:45:14] <OndraSterver> so, anybody interested in XBoard coco? 22€ shipped CZE, 25€ shipped int'l :)
[15:45:44] <OndraSterver> wow, I have been searching for AGES for simple oscillator
[15:45:56] <OndraSterver> who would have thought that that simplest thing aka inverter + xtal + 2 caps works
[15:46:12] <OndraSterver> the feedback resistor of 1M - 2M is not even needed
[15:47:55] <mnemoc> specing: it's a 6 pin header... not many ways to connect it wrong :<
[15:48:02] <OndraSterver> you can always flip it :)
[15:48:09] <OndraSterver> and put ground on data
[15:48:16] <specing> mnemoc: it might be a contact problem
[15:48:17] <mnemoc> OndraSterver: can that damage it?
[15:48:28] <OndraSterver> it should not
[15:48:30] <specing> go in with a multimeter and test the wires for contact
[15:48:42] <OndraSterver> you should see some volts on both CLK and DATA
[15:48:52] <OndraSterver> when you are trying to programm it
[15:49:29] <mnemoc> but on two brand-new programmers, one in USA and another in spain? :<
[15:49:57] <OndraSterver> did you travel across the world just to try programming it? :D
[15:49:59] <OndraSterver> what board is it on?
[15:51:35] <mnemoc> OndraSterver: nope, I received on my mail today and the other is in the office of my employer
[15:51:52] <OndraSterver> just kidding :P
[15:52:26] <mnemoc> OndraSterver: it's a custom relay/input board which I need to use from a C app
[15:52:43] <OndraSterver> oh
[15:52:45] <OndraSterver> did it work before?
[15:52:50] <megal0maniac> mnemoc: I've connected ISP the wrong way before. It was fine.
[15:53:05] <specing> 32MHz relay board with 128K flash?
[15:53:08] <OndraSterver> :P
[15:53:10] <OndraSterver> why not
[15:53:12] <specing> sounds overkillish
[15:53:15] <OndraSterver> relays clicking at 16MHz
[15:53:18] <OndraSterver> *DAT SOUND*
[15:53:28] <mnemoc> OndraSterver: the board itself works (using rs485).... but I need to upgrade it :<
[15:53:36] <specing> DUBSTEP!
[15:53:55] <specing> mnemoc: are you sure the programmer can do PDI?
[15:54:02] <specing> and that you are using it?
[15:54:11] <OndraSterver> avrispmkii can do PDI
[15:54:41] <OndraSterver> mnemoc, well, so the firmware had to get there somehow
[15:54:43] <OndraSterver> the first time
[15:54:47] <OndraSterver> so it obviously works
[15:54:51] <specing> teleport!
[15:54:59] <OndraSterver> it could have been preprogrammed by atmel
[15:55:03] <mnemoc> OndraSterver: using AVR's windows app
[15:55:09] <megal0maniac> Just did PDI with a STK500 clone. (mega16u2)
[15:55:09] <OndraSterver> by some programmer I mean :)
[15:55:22] <OndraSterver> mnemoc, do you have access to some windows machine?
[15:55:27] <mnemoc> OndraSterver: no :<
[15:55:32] <OndraSterver> that's bad
[15:55:43] <OndraSterver> linux is a pain thing to work with (ahem)
[15:55:44] <mnemoc> I used to be proud of it :\
[15:56:20] <specing> mnemoc: -F ? :)
[15:56:25] <mnemoc> until I started to need to play with ARM and AVR devices
[15:56:28] <OndraSterver> is that a force button?
[15:56:35] <specing> yep
[15:56:39] <OndraSterver> I dare you to use it.. :D
[15:56:48] <OndraSterver> but I suppose xmegas can not be made brickable
[15:56:59] <specing> it mounts a plough onto the AVR dude and makes it go onto a rampage
[15:56:59] <OndraSterver> they always start with 2MHz RC oscillator and PDI can not be disabled
[15:57:00] <mnemoc> specing: doesn't fail, but also doesn't write or read anything
[15:57:13] <OndraSterver> can not be bricked*
[15:57:53] <mnemoc> Device signature = 0x000000 is disturbing
[15:58:07] <OndraSterver> it just cannot be read
[15:58:10] <OndraSterver> do you have a scope?
[15:58:27] <mnemoc> nope :<
[15:58:36] <OndraSterver> how long cable are you trying to use?
[15:59:09] <mnemoc> the programmer comes with a ~15cm ribbon cable
[15:59:18] <OndraSterver> hmm
[15:59:21] <OndraSterver> do you have a VMeter?
[15:59:30] <mnemoc> a multimeter
[15:59:32] <OndraSterver> okay
[15:59:34] <OndraSterver> set it to VDC
[15:59:41] <OndraSterver> hook it up between SCK and gnd
[15:59:44] <OndraSterver> on the target board
[15:59:51] <OndraSterver> and click on read signature
[15:59:57] <mnemoc> btw, to use avrdude... do i need to power the board?
[15:59:59] <OndraSterver> you should see some spike on your dmm
[16:00:06] <OndraSterver> the board has to have power of course
[16:00:07] <OndraSterver> the chip
[16:00:30] <mnemoc> ok, wasnt' sure if the programmer powered the chip
[16:00:40] <megal0maniac> Mine does :)
[16:01:03] <OndraSterver> the programmer usually does not
[16:01:09] <megal0maniac> But that's because the 32u2 doesn't have an ADC, so it can't read vtarget anyway.
[16:02:11] * megal0maniac wonders about the differences between 32u2 and 32u4
[16:03:58] <karlp> the adc?
[16:05:16] <megal0maniac> Well yeah, for one.
[16:05:18] <mnemoc> OndraSterver: do you happen to have a known-to-work avrdude.conf chunk for ATXMEGA128A3?
[16:05:28] <OndraSterver> I have never used avrdude
[16:05:29] <OndraSterver> :P
[16:05:31] <OndraSterver> I have windows!
[16:05:33] <OndraSterver> with atmel studio 6
[16:05:44] <OndraSterver> and atxmega256a3u on my board that I am selling
[16:05:56] <Blecha> I think I am going to step up to something beefier pretty soon
[16:06:06] <OndraSterver> Blecha, beefier?
[16:06:15] <megal0maniac> OndraSterver: I know where to find you :)
[16:06:20] <mnemoc> I prefer to quit this job than to have to use windows ;-)
[16:06:26] <megal0maniac> When I'm a little less poor
[16:06:26] <OndraSterver> LOL
[16:06:29] <OndraSterver> ah ok
[16:06:35] <OndraSterver> meanwhile I will be the poor one :)
[16:06:37] <Blecha> Yeah I am making a 2.8" TFT touch screen + wifi thing to act as the UI for all my future projects
[16:06:49] <OndraSterver> Blecha, what about my board? O:-)
[16:06:53] <Blecha> I would like to do some basic web browsing and stuff
[16:06:59] <specing> lol
[16:07:00] <OndraSterver> enough flash to fit a lot
[16:07:06] <OndraSterver> 16kB RAM fits a lot as well
[16:07:11] <Blecha> link?
[16:07:32] <OndraSterver> http://myxboard.net/boards.html
[16:07:33] <OndraSterver> coco
[16:07:33] <megal0maniac> Have you fixed those 404s yet?
[16:07:34] <Blecha> and this would end up being a "finished" project that I need to fit a certain size so a prefabbed board might not work
[16:07:37] <OndraSterver> megal0maniac, no
[16:07:43] <OndraSterver> Blecha, ah
[16:07:49] <megal0maniac> That's poor marketing :P
[16:07:50] <OndraSterver> you could plug it into socket :)
[16:08:01] <OndraSterver> megal0maniac, I am not marketing it anywhere yet except here :D
[16:08:41] <megal0maniac> Blecha: It is relatively barebones. Peripherals are up to you. You get the chip, broken out with supporting circuitry.
[16:08:52] <OndraSterver> yep
[16:08:54] <OndraSterver> software has yet to come
[16:08:55] <megal0maniac> So a good foundation
[16:09:03] <Blecha> That seems like what I may need
[16:09:15] <megal0maniac> Blecha: You know you want it...
[16:09:17] <OndraSterver> I originally wanted to do just one piece just for me... but I figured "why not for others"
[16:09:21] <Blecha> I want something really beefy for this so I dont have to re do it later
[16:09:40] <OndraSterver> the only beefier is atxmega384c3 with 384kB flash... but it is hard to obtain
[16:09:48] <megal0maniac> OndraSterver: Rev2 boards?
[16:09:50] <OndraSterver> that is when you want to stay with xmega
[16:09:52] <specing> freehosting.cz
[16:09:53] <OndraSterver> megal0maniac, rev2?
[16:09:56] <OndraSterver> specing, yes
[16:09:59] <specing> OndraSterver: you should be ashamed of yourself
[16:10:00] <OndraSterver> pipni.cz
[16:10:02] <OndraSterver> lol
[16:10:02] <Blecha> Yeah, I like how many usarts it has :D
[16:10:06] <OndraSterver> :P
[16:10:18] <OndraSterver> rev2 will be once I sell out rev1 :)
[16:10:19] <megal0maniac> Blecha: And you like DACs, I know you do
[16:10:24] <OndraSterver> real DACs!
[16:10:27] <megal0maniac> Ah, okay
[16:10:29] <OndraSterver> not some PWM DACs
[16:10:45] <OndraSterver> I don't want to talk about changes to rev2 otherwise rev1 won't sell :
[16:10:46] <OndraSterver> :D
[16:11:11] <OndraSterver> XBoard Mini will be sold already with those changes
[16:11:13] <Blecha> Nice, I'll probably get one to dev with just so I can never worry about pins
[16:11:16] <specing> OndraSterver: looks like you are going to blow the faces off the arduino folks
[16:11:21] <OndraSterver> Blecha, what programmer do you have?
[16:11:27] <Blecha> arduino as ISP
[16:11:28] <OndraSterver> specing, IF I provide arduino-like IDE
[16:11:33] <OndraSterver> Blecha, does arduino know PDI?
[16:11:44] <Blecha> SPI?
[16:11:46] <specing> OndraSterver: Please dont :X
[16:11:46] <OndraSterver> atxmega can do only JTAG or PDI
[16:11:46] <OndraSterver> no
[16:11:50] <OndraSterver> specing, lol
[16:12:00] <Blecha> ah
[16:12:18] <OndraSterver> you can get avrisp mkii from Tom_itx for $20 I think?
[16:12:19] <Blecha> See I need to get going on some of that stuff because Im realizing that most the microcontrollers I have worked with are really weak
[16:12:24] <OndraSterver> yep
[16:12:27] <OndraSterver> this is 32MHz beast
[16:12:31] <OndraSterver> overclockable well beyond that :)
[16:12:44] <OndraSterver> I am pretty sure that WHOLE core can work at 48MHz just fine
[16:12:47] <OndraSterver> maybe even at 64MHz
[16:12:48] <Blecha> OndraSterver could it be bootloaded?
[16:12:54] <OndraSterver> I could add in one, yes
[16:13:11] <OndraSterver> I could put in Atmel's flip bootloader
[16:13:12] <Blecha> I am quite interested, will you be on for awhile?
[16:13:15] <OndraSterver> sure
[16:13:20] <megal0maniac> OndraSterver: DFU is good enough, no?
[16:13:27] <OndraSterver> does atmel provide DFU for this chip? :)
[16:13:28] <megal0maniac> Atmel FLIP?
[16:13:34] * megal0maniac shrugs
[16:13:36] <Blecha> Im about to get off work and ill be back on at home, whenever my replacement actually shows up that is
[16:13:37] <megal0maniac> Should do
[16:13:38] <OndraSterver> I know only about Flip for this
[16:13:49] <OndraSterver> already precompiled one
[16:13:54] <megal0maniac> Flip uses the DFU bootloader afaik
[16:13:59] <OndraSterver> could be
[16:14:01] <Amadiro> Anybody know if the bInterval reported for USB Keyboard HID devices represents the number of milliseconds between polling?
[16:14:06] <OndraSterver> I have just burned it in once, nothing else :)
[16:14:18] <Amadiro> it says 10 for my mouse, for instance, but 10 milliseconds latency on my mouse seems like way too much
[16:14:26] <Blecha> IT HAS A PUPPY ON IT!!!!!
[16:14:33] <OndraSterver> no, it has kitty
[16:14:37] <OndraSterver> Mini has puppy
[16:14:45] <OndraSterver> Ultra will have tiger or lion
[16:14:53] <OndraSterver> but Ultra is just something you can dream about right now
[16:14:56] <megal0maniac> Too much RAM
[16:14:58] <OndraSterver> I don't have even schematics
[16:15:03] <OndraSterver> megal0maniac, RAM costs about $5 or less
[16:15:25] <megal0maniac> 16mb for a 128kb chip?
[16:15:26] <Steffanx> Ultimate will be some ARM cortex-something OndraSterver ? :P
[16:15:33] <OndraSterver> no
[16:15:35] <OndraSterver> still xmega
[16:15:44] <OndraSterver> too bad there is no xmega256a1u yet
[16:15:49] <Steffanx> xmega-fetish :P
[16:15:49] <OndraSterver> only 128a1u
[16:15:59] <OndraSterver> Steffanx, easier to maintain one platform than two :)
[16:17:06] <megal0maniac> So, back to PDI/SPI. Can the mega16u2, for example, be programmed using SPI? Because the options I get from AS6 are SPI or HVPP, and SPI works with rikus' board
[16:17:15] <megal0maniac> No mention of PDI
[16:17:31] <OndraSterver> mega16 can be programmed by SPI or HVPP
[16:17:39] <OndraSterver> xmegas can be only by PDI and some by JTAG
[16:17:44] <OndraSterver> PDI replaces SPI pretty much
[16:17:45] <Blecha> Im also looking into PDI programming
[16:17:53] <Blecha> looks like someone has TRIED it with an arduino
[16:17:55] <megal0maniac> mega16u2 is the USB one
[16:17:56] <OndraSterver> and adds debug to it (not on avrisp of course, since it is ISP and not debugger)
[16:17:57] <Blecha> but no results just yet
[16:18:00] <OndraSterver> megal0maniac, so?
[16:18:14] <OndraSterver> I am glad I got my Dragon
[16:18:14] <megal0maniac> So it's still SPI?
[16:18:16] <OndraSterver> no
[16:18:21] <OndraSterver> it is not SPI
[16:18:45] <OndraSterver> it is bi-directional synchronous serial transmission
[16:18:52] <OndraSterver> aka both ways through one wire
[16:19:02] <OndraSterver> you need 4 pins for it, for the PDI itself even only 2
[16:19:05] <OndraSterver> clock and data
[16:19:11] <Blecha> \O/
[16:19:14] <Blecha> 404
[16:19:16] <megal0maniac> Shit, I'm being stupid
[16:19:16] <Tom_itx> gnd
[16:19:19] <megal0maniac> I mean ISP
[16:19:19] <OndraSterver> yes, Blecha
[16:19:23] <Tom_itx> don't forget the return path
[16:19:29] <OndraSterver> Tom_itx, that is still four
[16:19:34] <OndraSterver> gnd vtarget clk data
[16:19:49] <Tom_itx> right
[16:19:53] <megal0maniac> Then is PDI pin compatible with ISP?
[16:19:57] <Tom_itx> similar to TPI
[16:20:01] <Tom_itx> no
[16:20:10] <Tom_itx> different pinout
[16:20:11] <OndraSterver> yes, it is pin compatible, but not function compatible
[16:20:23] <OndraSterver> SCK = CLK
[16:20:25] <megal0maniac> Which means I'm definitely using ISP to program this chip, not PDI
[16:20:27] <OndraSterver> MOSI = DATA
[16:20:37] <OndraSterver> yes, you use SPI to program megas
[16:20:41] <OndraSterver> you use PDI to program xmegas
[16:20:41] <Tom_itx> maybe it was TPI that was odd
[16:21:05] <Blecha> wait a second...
[16:21:11] <Blecha> xmegas know how to USB?
[16:21:14] <OndraSterver> yes
[16:21:16] <OndraSterver> these yes
[16:21:17] <Blecha> :O
[16:21:21] <OndraSterver> *u do
[16:21:23] <Tom_itx> some do
[16:21:24] <OndraSterver> just as some megas do
[16:21:26] <Blecha> SHUT UP AND TAKE MY MONEY!!!
[16:21:31] <megal0maniac> lol
[16:21:34] <OndraSterver> lol
[16:21:49] <Blecha> Seriously though, i get paid on friday and I was going to get a mega328
[16:21:53] <OndraSterver> heh
[16:21:56] <megal0maniac> lol more
[16:22:05] <OndraSterver> I found some megas to be much more expensive than xmega
[16:22:06] <megal0maniac> Although I have 4 of them
[16:22:09] <OndraSterver> lol
[16:22:12] <megal0maniac> 6 actually
[16:22:15] <Tom_itx> so get one of each. the 328 is a good chip too
[16:22:18] <Blecha> If I can make this work size wise it should be way better
[16:22:54] <Blecha> Really though I may end up needing to etch my own board and solder the xmega myself :(
[16:23:08] <Blecha> I want this thing cell phone form factor
[16:23:27] <Blecha> mid 90s cell phone that is
[16:26:13] <OndraSterver> uploading DFU
[16:26:14] <OndraSterver> done
[16:26:28] <OndraSterver> bootrst set to bootloader
[16:26:30] <OndraSterver> now let's see
[16:26:34] <megal0maniac> Tom_itx: How would I go about using PDI with the lufa based avrisp firmware?
[16:26:52] <OndraSterver> http://clip2net.com/s/2gMts
[16:26:54] <OndraSterver> it worksss
[16:26:57] <megal0maniac> Using as6
[16:27:10] <megal0maniac> Still only shows ISP as the only option
[16:27:16] <megal0maniac> On a mega16u2
[16:28:48] <Blecha> off work brb
[16:29:14] <megal0maniac> OndraSterver: PDI in AS6?
[16:29:40] <OndraSterver> no, the xmega enumerated in DFU
[16:29:50] <OndraSterver> after flashing
[16:29:52] <OndraSterver> with DFU
[16:29:53] <megal0maniac> No, I mean how do I use it
[16:30:04] <megal0maniac> I'm all connected up
[16:30:10] <megal0maniac> AVRISP MKII
[16:30:15] <megal0maniac> ATmega16u2
[16:30:31] <OndraSterver> oh
[16:30:32] <OndraSterver> no idea
[16:30:48] <megal0maniac> Says the only other person who uses windows :)
[16:31:15] <theBear> heh
[16:31:15] <OndraSterver> :D
[16:31:25] <OndraSterver> I don't have avrisp nor clon
[16:31:25] <OndraSterver> e
[16:31:56] <megal0maniac> Busy talking to the supervisory chip on an Arduino
[16:35:02] <OndraSterver> yep the USB bl works
[16:35:12] <OndraSterver> just tie PE5 to ground and it boots into BL
[16:37:10] <specing> PEE
[16:37:17] <OndraSterver> lol
[16:47:05] <megal0maniac> How do you load flash? FLIP?
[16:47:20] <megal0maniac> s/load/program
[17:07:01] <OndraSterver> oh he is gone
[17:31:05] <megal0maniac> Quick question.
[17:31:13] <dekroning> hi
[17:31:52] <dekroning> when using an Arduino UNO board, and I would like to use avrdude to upload some firmware, which -c flag option do I need to use ?
[17:31:59] <megal0maniac> If I have an AVR running at 5V and I want to connect to the UART with a 3V3 serial adapter, what should I have between the two?
[17:32:06] <megal0maniac> dekroning: -c arduino
[17:32:13] <megal0maniac> Oh wait
[17:33:38] <specing> megal0maniac: zeners
[17:34:20] <megal0maniac> dekroning: Yes, arduino
[17:34:21] <dekroning> megal0maniac: when using "arduino" i'm getting 'can't open device "unknown": No such file or directory'
[17:34:51] <specing> -P usb
[17:35:45] <dekroning> can't open device "usb": No such file or directory
[17:36:17] <megal0maniac> Default string is: avrdude.exe -C path\to\avrdude.conf -v -v -v -v -p atmega328p -c arduino -P COM1 -b 115200 -D -U flash:w:path\to\file.hex:i
[17:36:27] <megal0maniac> specing: Connected where?
[17:36:41] <megal0maniac> Between RX/TX & GND?
[17:36:57] * megal0maniac vaguely remembers VUSB schematic
[17:37:29] <dekroning> megal0maniac: i'm on OSX, I probably should have said that a little bit earlier :-)
[17:38:40] <megal0maniac> It all still applies. Only difference is the .exe part and the COM1 part. Leave .exe out, leave -C avrdude.conf out and replace COM1 with /dev/ttyxxx
[17:38:52] <megal0maniac> 115200 baud is for UNO R3
[17:39:09] <dekroning> k thanks
[17:39:16] <megal0maniac> And you don't need any of the vs
[17:42:27] <megal0maniac> specing: similar to this? http://vusb.wikidot.com/local--files/hardware/level-conversion-with-zener.gif
[17:43:31] <OndraSterver> Tom_itx, is there any tool that can do JTAG but can not do PDI on xmegas?
[17:43:42] <OndraSterver> I do wonder if I should disable JTAG :)
[17:43:55] <OndraSterver> although people can disable JTAG in software later
[17:45:28] <megal0maniac> Why would you disable it?
[17:45:41] <OndraSterver> because 4 pins are then used for JTAG
[17:45:43] <OndraSterver> instead IO
[17:48:39] <megal0maniac> Why can't you use them as both?
[17:48:52] <megal0maniac> Oh wait
[17:48:54] <megal0maniac> Meh
[17:49:25] <specing> OndraSterver: just leave it on
[17:49:39] <OndraSterver> specing, yes
[17:49:48] <OndraSterver> and only add MCU.MCUCR = MCU_JTAGD_bm;
[17:49:55] <OndraSterver> (plus CCP = CCP_IOREG_gc; before that)
[18:58:21] <OndraSterver> two XBoards packed
[18:58:24] <OndraSterver> ready to be shipped :)
[18:58:27] <OndraSterver> need just address!
[18:58:29] <OndraSterver> and money.
[18:58:34] <OndraSterver> (PayPal?)
[18:58:37] <Tom_itx> woot
[18:58:52] <Tom_itx> they're not free??!
[19:02:44] <OndraSterver> no
[19:02:48] <OndraSterver> obviously
[19:02:54] <OndraSterver> 25€ shipped international
[19:11:30] <Blecha> I was wondering about shipping :D
[19:11:44] <Blecha> Now I just need to either learn about bootloaders or shell out for a real programmer...
[19:12:02] <karlp> what programmer do you have now?
[19:12:13] <Blecha> arduino
[19:12:16] <Blecha> flash as ISP
[19:12:31] <karlp> that's not terrible, just a bit messy wires wize
[19:12:45] <karlp> it's basically all a usbtinyisp is
[19:12:47] <Blecha> OndraSterver do you have physical dimensions on the site im not seeing?
[19:12:52] <Blecha> karlp no PID
[19:12:58] <Blecha> PDI*
[19:13:22] <Blecha> OndraSterver are you czech?
[19:15:05] <sirdancealot> Blecha, je
[19:16:10] <Blecha> I guess I have to buy one now...
[19:16:30] <Tom_itx> damn straight
[19:16:38] <Tom_itx> fork up the bucks
[19:17:22] <Kevin`> there's no reason an ardunio couldn't do pdi, actually. if the code doesn't exist yet it's just because nobody has updated it. probably all the people using xmega just shell out the $50 for atmel's toys
[19:18:18] <Tom_itx> or spend half that and use mine
[19:18:39] <karlp> Blecha: aight, sorry, didn't know you needed pdi.
[19:18:50] <Blecha> Kevin' yeah I looked around, nothing solid yet
[19:19:26] <Blecha> Tom_itx between you and Ondraster Im going to be poor
[19:19:37] <Tom_itx> naw
[19:19:42] <Tom_itx> they're both bargains imo
[19:19:46] <Blecha> I was actually looking at more powerful SOC kinda things right now
[19:20:02] <Blecha> as I was going to get a TFT touch screen and wifi in this thing
[19:20:47] <Tom_itx> i wouldn't mind getting an xmega board but currently don't have the time it would take to learn all the new registers
[19:23:10] <Blecha> http://translate.google.com/translate?sl=es&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fwww.todopic.com.ar%2Fforos%2Findex.php%3Ftopic%3D39080.0&act=url
[19:27:00] <karlp> Blecha: get a carambola...
[19:29:11] <Blecha> http://shop.8devices.com/carambola
[19:29:17] <Blecha> ?
[19:32:43] <Blecha> karlp that is perfect!
[19:33:44] <Blecha> I am trying to determine if it has enough gpio or if I could just use a shift register
[19:35:08] <Kevin`> most devices have hardware spi. where's the documentation for that though
[19:35:47] <Kevin`> (the carambola)
[19:39:35] <karlp> Kevin`: you just use the linux spi drivers.
[19:39:57] <karlp> using a carambola type device will _not_ be the same as using a bare metal micro though :)
[19:40:14] <Kevin`> karlp: well sure, I meant that the shift register or io should be pretty easy to work out
[19:40:29] <Kevin`> it's just that I didn't see any documentation links on that page
[19:40:46] <karlp> they probably could/should do a better job,
[19:41:07] <karlp> but I think they're target has ended up being more people who already knew how to do linux soc work, but didn't want to rebuild their own boards.
[19:41:19] <karlp> so the "documentation" is just the standard hardware spi docs,
[19:41:26] <karlp> it's certainly nothing carambola specific
[19:53:50] <OndraSterver> Blecha, yes, I am
[19:54:13] <OndraSterver> with bootloader you just pull pin PE5 to ground during reset and it enumerates as USB DFU atxmega256a3u
[19:54:24] <OndraSterver> and with Atmel FLIP or any other compatible application you select the hex file
[19:54:27] <OndraSterver> connect to the device
[19:54:32] <OndraSterver> and hit RUN
[19:54:35] <OndraSterver> and RESTART
[19:54:40] <OndraSterver> boom, done
[19:54:57] <OndraSterver> and unless you accidentaly kept the PE5 grounded it will restart into application
[19:55:11] <OndraSterver> you can actually go to application without restarting even
[19:55:17] <OndraSterver> and keep the PE5 tied to ground
[19:55:26] <OndraSterver> you don't need any separate programmers
[19:56:12] <Tom_itx> does DFU support xmegas yet?
[19:56:34] <OndraSterver> yes
[19:56:41] <OndraSterver> the 3.5.7 does, the old 2.something does not
[19:56:52] <OndraSterver> I have used it to upload my test application with which they will be shipped
[19:56:59] <OndraSterver> which works as IO tester :)
[19:57:15] <OndraSterver> to see if I have soldered everything correctly
[19:58:13] <OndraSterver> I need to make one tester board - I plug in the board, hook up Dragon, it flashes bootloader, via bootloader I flash application which will test all IO and report to the base board
[19:58:17] <OndraSterver> and somehow test PDI as well
[19:58:25] <OndraSterver> (something like NOP instruction or read signature or whatever)
[19:58:58] <Tom_itx> verify the program
[19:59:02] <Tom_itx> using PDI
[20:00:05] <OndraSterver> that works as well
[20:00:33] <Blecha> I think for my lcd project im going to get something even more powerful :O
[20:00:39] <Blecha> but I definately want one
[20:01:00] <OndraSterver> "definately"... I know you are in the USA... but I can not miss that one :D
[20:01:03] <OndraSterver> sorry :D
[20:01:31] <OndraSterver> http://theoatmeal.com/comics/misspelling
[20:02:14] <OndraSterver> I found that whenever I link to this or some other oatmeal misspelling or similar page the person remembers it ... very quickly
[20:02:40] <OndraSterver> Blecha, you will be looking for some faster cortex m3 (probably) MCU
[20:02:45] <OndraSterver> and enjoy writing software for it :D
[20:03:01] <OndraSterver> all the GUI (gooey?) stuff :P
[20:03:16] <Blecha> http://www.carambola.cc/definition/
[20:04:05] <OndraSterver> where are all the IOs? :)
[20:04:10] <Blecha> Also I've already seen that oatmeal:P
[20:04:35] <OndraSterver> you will most likely use 16bit driven display to speed things up, that is 16 pins off right away
[20:04:58] <Blecha> 8 bit
[20:05:24] <OndraSterver> then SPI for SD card
[20:05:32] <Blecha> Yep
[20:05:33] <OndraSterver> bunch of pins for buttons
[20:05:42] <Blecha> No buttons
[20:05:46] <OndraSterver> oh
[20:05:51] <Blecha> two ADCs and digital pins for touch
[20:06:09] <Blecha> maybe 1 or 2 for physical buttons
[20:06:21] <karlp> OndraSterver: not everyone does everything with parallel io and a single chip...
[20:06:38] <OndraSterver> heh
[20:06:41] <OndraSterver> but serial is slow
[20:06:45] <OndraSterver> for display
[20:07:23] <karlp> says who?
[20:07:28] <OndraSterver> says me
[20:07:32] <OndraSterver> if you want to update whole screen...
[20:07:43] <OndraSterver> and still keep up with few FPS..
[20:07:46] <karlp> if my chip runs at 400mhz, I can run spi pretty fast...
[20:07:59] <Blecha> 320mhz
[20:08:16] <karlp> whatever, order of magnitude more than the xmega
[20:08:20] <Blecha> shift register for the data lines?
[20:08:42] <karlp> you could also look at other soc boards that have display interfaces built in.
[20:10:10] <Blecha> hmm
[20:10:15] <karlp> (you can also use a satellite driver chip, running off usb)
[20:10:30] <karlp> hell, it could even be an xmega if you wanted it badly enough
[20:19:16] <Blecha> karlp I am having trouble finding any SoC boards that dont have massive headers on them
[20:19:31] <Blecha> Its either the chip by itself or on a dev board :(
[20:19:45] <Blecha> dev board is fine but they all have huge headers
[20:21:49] <OndraSterver> 400 pin BGAs => 400 pin headers? :D
[20:25:35] <Blecha> karlp :D http://spritesmods.com/?art=spitft&f=had
[20:28:39] <Blecha> THIS IS SO PERFECT!
[20:32:27] <Kevin`> btw, use hardware spi if possible, the gpio spi works at probably 200kbit max, whereas hardware spi will probably be fine at 20mbit
[20:32:54] <Kevin`> although it looks like he used the gpio one just for the touchscreen
[20:33:02] <Kevin`> ..which is odd, since you can connect multiple devices to spi
[20:33:12] <Kevin`> but I guess it doesn't need to be fast and maybe was a bother
[20:36:50] <Kevin`> the speed on his display looks workable too
[20:36:58] <Kevin`> entirely average for random framebuffer devices
[20:37:13] <Kevin`> wouldn't be good for video, but who cares
[20:39:54] <Blecha> Kevin maybe me
[20:39:58] <Blecha> idk yet
[20:40:17] <Blecha> I need to find a better LCD I think, adafruit is meh
[20:40:49] <OndraSterver> Tom_itx, if one issues chip erase via PDI, one does not need to do another page erase, right?
[20:44:07] <OndraSterver> duh it is so late!
[20:44:07] <OndraSterver> gn
[20:48:40] <jadew> freaking finally, I finished the asm code for attiny13 for dht11 to 1wire
[20:48:43] <Blecha> GN sir
[20:49:30] <jadew> it fits and it works and it took me freaking 5 hours to figure out what was wrong with the last few lines of code
[21:27:55] <jadew> in case you're wondering, 4 DHT11 chips taking measurements at the same time, in the same spot: http://pastebin.com/9UGDhUTE
[21:28:04] <jadew> the RH doesn't seem very reliable
[21:29:20] <jadew> however the temperature is ok, my other chips are reporting 27
[22:23:20] <teko> .