#avr | Logs for 2016-12-16

Back
[13:25:53] <carabia> I think I'm gonna get some plastic plugs so I can mount a makeshift shelf over my table for iron scope psu. mount overhead lights on it and also that could probably give a good mounting point for my magnifying glass. those outta the way I might get me some screens
[13:26:48] <carabia> so you pc nerds, wtf kind of a gpu i need to drive 2x 4k screens
[14:01:12] <bss36504> Dual 1080s in SLI
[14:01:30] <bss36504> jk, idk bro
[14:02:28] <bss36504> What are you trying to do with these 4K displays?
[14:18:28] <joebobjoe> How would a USI SPI slave signal the master that it isn't ready to receive any more data?
[14:18:54] <joebobjoe> The spec sheet for the Attiny85 hints that the CPU can put DO into high impedance after the USI counter interrupts
[14:21:05] <bss36504> An additional signal is one option, or creating a status instruction that the slave can always respond to, ala serial memories and their "write in progress" status bits.
[14:33:59] <joebobjoe> bss36504: you mean basically the master would send data until the slave responds?
[14:39:07] <bss36504> No not really. Your slave needs to be able to respond to commands at all times. The master is responsible for first checking with the slave to see if it is ready for "x amount of data" before it sends it.
[14:40:01] <bss36504> I was making a comparison to a serial memory in that those generally cant accept multiple write commands, and writing takes a non-trivial amount of time. So, the master first checks to see if there is a write in progress by sending a command which will return the status register
[14:40:18] <bss36504> the status register of course has a bit to indicate a write in progress.
[14:40:29] <bss36504> and in that way, the master is the one in charge of throttling the data.
[14:41:13] <bss36504> However, some chips also just have a separate, dedicated data-ready signal that gets connected to the master. Again though, the master is responsible for checking that signal before blasting data at the slave.
[14:43:01] <bss36504> without more implementation details, I would say your slave should probably have some kind of data buffer in software, and then this virtual status register you create will reflect if there is space in the data buffer.
[14:45:02] <bss36504> I would suggest looking at existing slave chips to see how the interface is implemented, and then see how you can emulate that. A serial memory or a audio codec are examples of both methods I described.
[14:51:24] <joebobjoe> bss36504: ok but I'm just talking about the physical shift register. It might take time for the CPU wake up after counter overflow, etc. and I don't want the master to overwrite the USI Data Register before I can read it
[14:51:45] <joebobjoe> bss36504: I don't want to have to scour my code to enforce CPU timing constraints
[14:55:22] <joebobjoe> bss36504: I guess the data sheet example mentions that you can put the output to high impedence if you have multiple slaves
[14:57:43] <bss36504> Right but how would that be helpful? That's just to avoid bus contention with multiple slaves. Pretty standard, but not really something you could test for
[14:58:33] <bss36504> But to answer your question, there is no way to check or otherwise enforce, as far as I know, data ready without an extra signal or a more well defined software protocol.
[14:58:51] <bss36504> Unfortunately, you'll probably have to scour your code no matter what.
[15:02:43] <joebobjoe> bss36504: maybe I could make sure that the last bit of the shift register is always 0, and then manually switch the pin high when I'm ready to receive more data
[15:04:37] <bss36504> Sure but that means your master and slave will have to constantly enable and disable the SPI/USI in order to access the pins directly. It's a way to do it, yes. But if it were me, I would develop the software a bit more and establish a command protocol and handle all this handshaking stuff in software.
[15:12:37] <joebobjoe> bss36504: yea I don't even think that would work because I don't think there is an atomic way to do it
[15:13:24] <joebobjoe> bss36504: so basically I have to ensure that I can respond to a command within x CPU clock cycles, and the master has to know all of this timing information
[15:15:48] <joebobjoe> bss36504: I found http://www.atmel.com/Images/Atmel-2585-Setup-and-Use-of-the-SPI_ApplicationNote_AVR151.pdf this should help me :)
[15:18:25] <joebobjoe> Can I use one of those USB to SPI cables to do HVSP?
[15:23:00] <Jartza> hmmh
[15:23:14] <Jartza> seems my hack works fine :D
[15:41:03] <Jartza> USI is pretty nice for one thing at least ;)
[15:58:44] <carabia> bss36504: desktop. worth doing = worth overdoing
[16:08:16] <carabia> the new line of nvidia cards state maximum resolution at 7680x4320... so that's like what, 2x2 of 4k screens
[16:09:16] <carabia> the same "spec sheet" also states pixel format for this resolution at "8 bit rgb"
[16:09:37] <carabia> i guess (hope) they mean 888!
[16:11:00] <carabia> i for one would have mixed feelings having a screen that sharp with 256 colors
[16:45:02] <Lambda_Aurigae> 16 colors is more than enough for anybody!
[16:58:28] <carabia> s/16/2
[16:58:44] <carabia> fixed it
[17:01:44] <Jartza> Lambda_Aurigae: 8 colors! ;)
[17:01:53] <Jartza> https://www.youtube.com/watch?v=TWvUPgOZGjQ
[17:02:03] <Jartza> I'm trying to get something bit more fancy still
[17:03:38] <carabia> that background vaguely reminds me of c64 tape loads
[17:04:13] <Lambda_Aurigae> Jartza, now you need 2 buttons to control the skiier going down the slope.
[17:05:21] <Jartza> lol
[17:05:40] <Jartza> actually!
[17:05:41] <carabia> oh yeah, you should make it into an olympic skier clone
[17:05:52] <Jartza> that would be really doable if I skip one color
[17:06:16] <Jartza> only use "cga colors" and make a skier clone
[17:06:16] <carabia> with the skijump, slalom and off-course too
[17:06:18] <Jartza> lollers
[17:06:31] <Jartza> of course, all in 512 bytes
[17:07:21] <carabia> yes
[17:07:57] <carabia> https://www.youtube.com/watch?v=ya6Gzp5_aBk easily
[17:08:49] <Jartza> yea... except I have like umm... 60 horizontal "pixels"
[17:08:52] <Jartza> or something like that
[17:09:24] <carabia> well
[17:09:33] <carabia> use a chip per pixel and sync them somehow
[17:09:37] <Lambda_Aurigae> you can do it Jartza !!
[17:09:39] <carabia> problem solved
[17:09:47] <Lambda_Aurigae> that would be a winning entry even I bet!
[17:09:51] <Jartza> carabia: can't use more than 1kB total
[17:10:02] <Jartza> so no more than 2 chips ;)
[17:10:09] <carabia> what are these gay rules?
[17:10:11] <Lambda_Aurigae> carabia, he does that with the octapentaveega, kinda, with 1 chip per color line.
[17:10:18] <Lambda_Aurigae> it's a 1K contest.
[17:10:22] <Jartza> carabia: well, if it's called "1K contest"
[17:10:25] <carabia> where?
[17:10:30] <Lambda_Aurigae> hackaday
[17:10:32] <carabia> oh.
[17:10:36] <carabia> arduinoday
[17:10:41] <Lambda_Aurigae> pretty much these days.
[17:10:43] <carabia> raspberrypiday
[17:11:08] <Jartza> carabia: octapentaveega is different beast
[17:11:09] <carabia> rpiduino3dprintcnchotglueday
[17:11:09] <Lambda_Aurigae> can't use an rPI unless you tie it to an ardweeny!
[17:11:28] <Jartza> carabia: https://www.youtube.com/watch?v=G1QWNDck0yU
[17:11:44] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxRXVzSUNCT1h2NHM/view
[17:11:58] <Jartza> same in B/W with single attiny85
[17:12:14] <carabia> is that real rotation or the angle is messed up?
[17:12:37] <Jartza> ?
[17:12:49] <carabia> the image seems rotated or slanted
[17:13:00] <carabia> yt video
[17:13:09] <Jartza> ahh well... taken with cellphone from monitor
[17:13:13] <carabia> oh, alright
[17:13:14] <Jartza> yes, there's an angle
[17:13:30] <Jartza> https://github.com/rakettitiede/octapentaveega
[17:13:58] <Jartza> there's more videos in readme
[17:14:35] <carabia> that's a pretty cool little thing i must say
[17:14:56] <carabia> i was thinking it'd be some real black magic going on if you can do 2d rotations on it
[17:15:03] <Jartza> hehe
[17:15:22] <Jartza> I just had to add the graphics mode in it too
[17:15:22] <Jartza> https://www.youtube.com/watch?v=YL0RwEtTN70
[17:16:03] <carabia> what's the resolution?
[17:16:09] <carabia> full 640?
[17:16:23] <carabia> seems blocky, has to be less?
[17:16:30] <Jartza> lol
[17:16:36] <Jartza> the chip has 512 bytes of memory
[17:16:38] <carabia> :D
[17:16:54] <carabia> oh yeah
[17:17:08] <carabia> probably hard to fit a 640 fb in that thing... :)
[17:17:09] <Lambda_Aurigae> and he uses all 512 bytes for video ram.
[17:17:29] <carabia> so what is the res?
[17:17:43] <Jartza> 32x16 characters ;)
[17:17:44] <carabia> it's the same, 32?
[17:17:47] <carabia> yeah
[17:18:44] <carabia> un poquis tired. didn't think it through all the way to fb...
[17:19:04] <carabia> well. More chips means more framebuffer. Go.
[17:19:06] <Jartza> well, each character can present 2x4 pixel block
[17:19:27] <Jartza> sure, but I use the "more framebuffer" for colors
[17:19:49] <Jartza> in the graphics mode, any pixel can be any color, so no compromise :)
[17:19:57] <Jartza> it also supports back- and foreground color for text
[17:20:17] <carabia> but even more chips means more framebuffer /and/ colors
[17:21:34] <Jartza> getting pretty pointless already ;)
[17:21:37] <Jartza> I wanna go smaller
[17:21:42] <Jartza> https://drive.google.com/drive/folders/0B2dTzW9TMeBxcS1nNFZWalFYOHc
[17:21:47] <Jartza> this is what I currently have
[17:21:55] <Jartza> the MCU is the leftmost red breakout board
[17:22:05] <Jartza> the second breakout is oscillator
[17:22:20] <carabia> hmm
[17:22:26] <Jartza> that's attiny5
[17:22:32] <Jartza> 512 bytes of flash, 32 bytes of ram
[17:22:41] <Jartza> => https://www.youtube.com/watch?v=TWvUPgOZGjQ
[17:22:47] <Jartza> that's 198 bytes
[17:22:54] <carabia> well... on the subject of being pointless i think driving vga with an attiny might qualify
[17:23:10] <Jartza> octapentaveega is useful product
[17:23:12] <Lambda_Aurigae> naaaa
[17:23:19] <carabia> Jartza: do explain
[17:23:32] <Lambda_Aurigae> I've used the octapentaveega for display for my microcontroller projects.
[17:23:32] <Jartza> I know multiple people who use it for example with arduino, to get VGA out from it
[17:23:41] <Jartza> or ARM, or any other MCU
[17:23:49] <Jartza> I use it with my 3D printers :)
[17:24:05] <Jartza> carabia: it has UART and it parses ANSI-escapes, so it's pretty straightforward to use
[17:24:20] <Jartza> and only requires single communication wire
[17:24:54] <Lambda_Aurigae> atmega1284p, attiny85, a dmm chip, and a 14 inch elo touchscreen vga monitor to make a custom digital multimeter.
[17:24:57] <carabia> well i'll give you that alright, but i think it's more to do with the fact that you made a thing to easily interface vga, and not because /the thing is made with attinys/
[17:25:01] <Lambda_Aurigae> with data capture and playback.
[17:25:45] <carabia> Lambda_Aurigae: my point applies
[17:26:33] <Lambda_Aurigae> I think it's a nifty way to do video interfacing with microcontroller projects.
[17:28:27] <carabia> Lambda_Aurigae: exactly, but that wasn't my point
[17:29:27] <carabia> you could use an mcu (e.g. a mega if you insist on avrs), to drive more colors + higher res. My point was that it's made with tinys, isn't probably the biggest strength of said product
[17:29:53] <Lambda_Aurigae> yes.
[17:30:39] <carabia> though it is of academic curiosity
[17:30:50] <Lambda_Aurigae> I've kinda duplicated it with a pic32 chip and gotten more res and more colors.
[17:31:55] <Lambda_Aurigae> what Jartza has accomplished on that attiny85 chip is amazing. like what we used to accomplish with software before we had gigabytes of ram to play with back in the good old days.
[17:34:01] <carabia> i was by no means denying that, pointless - for the lack of a better word - ideas can often produce interesting curiosities. What I'm saying is, you can build a more practical (and performant) solution with readily available stuff.
[17:34:58] <carabia> and in addition to curiosities they can also provide practical things, which can or can't be improved.
[17:35:06] <carabia> s/provide/produce
[18:12:22] <Jartza> carabia: this was made just to be fun, originally.
[18:12:31] <Jartza> or even before that, just to prove it can be done :)
[18:28:29] <chatter> hey guys
[18:29:13] <FL4SHK> Oh boy
[18:29:17] <FL4SHK> Pretty sure that's a bot
[18:31:25] <learath> is it the fun one that horribly misquotes the koran?
[18:31:30] <FL4SHK> Yes
[18:31:36] <learath> I kind of love that one :)
[18:47:48] <carabia> Jartza: yea, and it's quite impressive
[18:48:06] <carabia> chatter: hey!
[18:48:19] <chatter> allah is doing
[18:48:24] <chatter> sun is not doing allah is doing
[18:48:26] <chatter> to accept islam say that i bear witness that there is no deity worthy of worship except allah and muhammad peace be upon him is his slave and messenger
[18:50:29] <carabia> oh i see. Allah and his pedophile prophet is advancing into the west not only physically, but also in the cyber realm.
[18:50:43] -!- carabia was kicked from #avr by Tom_itx!~Tl@unaffiliated/toml/x-013812 [carabia]
[18:50:51] <Tom_itx> haha sucker
[18:50:59] <Lambda_Aurigae> any diety who wants slaves isn't worth worshiping in my not so humble opinion.
[18:51:29] <Lambda_Aurigae> ummm...wrong troll?
[18:51:31] <learath> fair.
[18:51:49] -!- chatter was kicked from #avr by Tom_itx!~Tl@unaffiliated/toml/x-013812 [chatter]
[18:52:01] <FL4SHK> uh
[18:52:02] <Tom_itx> +-b *!*@dsl-hkibrasgw4-50df57-218.dhcp.inet.fi
[18:52:07] <Tom_itx> -b *!*@dsl-hkibrasgw4-50df57-218.dhcp.inet.fi
[18:52:17] <FL4SHK> ooh
[18:53:14] <Jartza> hmmh
[18:53:28] <Jartza> I think I need avr simulator for a while
[19:02:35] <Tom_itx> hopefully he can rejoin...
[19:03:43] <Vikinger> PORTB |= _BV(PB0) and this will set the bit to 1, right ?
[19:04:36] <carabia> if i wasn't such an asshole i would feel borderline violated
[20:17:26] <Jartza> haha
[20:19:43] <Jartza> https://www.youtube.com/watch?v=kLnk6vnc7w0
[20:28:43] <iamawesome> Hi, what's the relation between avr and atmega?
[20:29:01] <iamawesome> I knew, avr is a name of microcontroller by atmel
[20:29:20] <Tom_itx> atmega is part of their 8bit line
[20:30:11] <Tom_itx> attiny, atmega, xmega are their 8 bit line
[20:31:35] <Jartza> Code : 126 words (252 bytes)
[20:31:56] <iamawesome> Tom_itx: Is atmega32 a part of avr family?
[20:32:48] <Tom_itx> yes
[20:32:52] <Tom_itx> an old one
[20:33:10] <Tom_itx> 40 pin
[20:33:57] <iamawesome> What's the latest microcontroller by atmel?
[20:34:49] <Tom_itx> i'm not sure, i haven't been keeping up with all their changes lately
[20:36:10] <Tom_itx> there are lots of newer chips than the mega32 though
[20:40:17] <iamawesome> When we touch the screen of a smartphone, it takes the input, is it done by microcontroller of atmel?
[20:43:21] <Tom_itx> probably arm
[20:43:46] <Tom_itx> atmel does have touch though
[20:45:51] <iamawesome> http://www.atmel.com/products/microcontrollers/avr/32-bitavruc3.aspx , these are the latest 32 bit, right?
[20:50:54] <iamawesome> Is atmega asic or fpga?
[20:51:04] <Jartza> I think attiny871 is the latest?
[21:03:23] <iamawesome> Jartza: http://www.atmel.com/products/microcontrollers/avr/tinyavr.aspx , it's not there.
[21:05:02] <Jartza> sorry yea, 817
[21:05:16] <Jartza> typoed
[21:06:09] <iamawesome> Jartza: That's 8bit, how were you sure that it was the latest?
[21:06:22] <iamawesome> There are 32 bit microcontrollers too
[21:07:12] <carabia> iamawesome: there was just recently released a new batch of attinys
[21:07:12] <Jartza> so?
[21:07:37] <Jartza> what does the bit amount has anything to do with latest releases? :)
[21:07:45] <carabia> don't think the avr32s are that actively developed
[21:08:15] <Jartza> avr32 is sort of dead
[21:08:21] <carabia> and furthermore i'd imagine mcp would want to either cut the avr32 line or the arm line... or both for their own risc core!!
[21:08:41] <carabia> and Jartza that's a nice blend!
[21:10:03] <Jartza> carabia: little buggy still :D
[21:10:20] <Jartza> but what can you do with attiny5 :D
[21:10:50] <carabia> well
[21:11:05] <carabia> blending is very limited anywho with 8 colors... hahah
[21:11:45] <Jartza> sure
[21:12:08] <carabia> though
[21:12:14] <carabia> i have a killer idea for you
[21:12:17] <Jartza> that was just testing of the bars, I will put three of them there
[21:12:19] <Jartza> all moving
[21:13:29] <carabia> do you have any ram to spare?
[21:14:18] <Jartza> the chip has 32 bytes of ram, of which I'm currently using 6 bytes :)
[21:14:23] <carabia> cause a killer idea would be to have a 2-3 bit alpha channel and introduce alpha blending with color dithering. But I'm not sure if you can spare the cycles either, haha
[21:14:31] <Jartza> so "spare" is a relative
[21:14:49] <Jartza> lol
[21:15:00] <Jartza> single cycle draws like 3 "vga pixels"
[21:15:06] <carabia> oh wait no, i'm thinking of the octapentaveega thing
[21:15:07] <Jartza> I mean, single asm opcode
[21:15:19] <Jartza> this is attiny5
[21:15:24] <carabia> yeah and yeah
[21:15:29] <Jartza> 6 pins, 12MHz, 512 bytes flash and 32 bytes ram
[21:15:34] <carabia> cause that was 32x16
[21:15:46] <Jartza> sot23-6
[21:15:56] <Jartza> I'm pushing the 8-color VGA out from 3 pins
[21:16:12] <Jartza> and I have now used about half of the flash
[21:16:30] <carabia> yeah, ...but with this you can't really dither
[21:16:35] <Jartza> no
[21:16:46] <Jartza> and I'm also running out of clock cycles pretty soon
[21:16:55] <Jartza> because 12MHz is max. clock for this chip
[21:17:00] <carabia> yeah, figures
[21:17:13] <Jartza> vga pixel clock is 25.175Mhz :)
[21:25:38] <iamawesome> We can program atmel atmega throug C language, right?
[21:25:51] <iamawesome> *atmel atmega microcontroller*
[21:27:08] <carabia> iamawesome: no
[21:27:43] <iamawesome> Why not?
[21:27:50] <carabia> only perl
[21:28:56] <carabia> other less utilized possibilities include, but are not limited to: fortran, smalltalk, racket and B
[21:29:28] <iamawesome> Why can't we use C langauge for avr programming?
[21:30:04] <FL4SHK> It's a bad idea
[21:31:13] <carabia> rumor has it, someone once managed to get it working using a technique called "high voltage programming"
[21:32:23] <carabia> such a practice is widely regarded as dangerous since it utilizes 220 vac 50...60 hz, specifically
[21:33:56] <carabia> a stable mains supply is necessary. voltage drift can affect device performance.
[21:34:50] <carabia> hmm... rms.
[21:38:00] <carabia> iamawesome: you may or may not also require a turbo encabulator, depending on the magneto reluctance and capacitive directance
[21:56:10] <iamawesome> Is there any relation with verilog and avr?
[21:56:34] <Tom_itx> no
[22:04:39] <iamawesome> Only perl?
[23:05:47] <Emil> Hmm
[23:05:53] <Emil> The heck could be wrong with my code
[23:06:18] <Emil> I'm pushing strings to pgmspace but some parts aren't printed correctly :o
[23:07:27] <Emil> Wait, the fuck
[23:07:37] <Emil> If I print slower everything is kewl
[23:10:48] <Emil> Hngnh