#avr | Logs for 2016-04-14

Back
[01:11:55] <xMopxShell> Has anyone had problems with avr programmers and apple usb adapters?
[01:18:37] <Casper> usb-serial? if so then not all programmer will work
[01:18:43] <Casper> all what bitbang will not work
[01:27:06] <xMopxShell> Casper: usbasp
[01:28:51] <inflex> Can you program the Tiny10 using usbtiny programmer with avrdude 6.1 now?
[01:29:12] <inflex> or do I still need an AVRISP mkII ?
[01:32:47] <Casper> Valid parts are:
[01:32:47] <Casper> t10 = ATtiny10 [/etc/avrdude.conf:16881]
[01:32:56] <Casper> avrdude: Version 5.11.1, compiled on Oct 6 2014 at 20:58:11
[01:33:10] <Casper> oh with the usbtiny...
[01:33:15] <Casper> missed that part
[01:33:21] <Casper> (2am..)
[01:33:36] <inflex> np
[01:34:07] <inflex> yeah, I had a couple of Tom_itx 's TPI programmers but something's gone wrong and none are working now (my fault, I did something wrong)
[01:34:20] <inflex> Got plenty of usbtiny ones (at2313 based)
[03:10:18] <Haohmaru> i'm trying to build avr-gcc, using linux, to run on windows, so i'm using i686-w64-mingw32.. i managed to build the binutils for avr, but i hit a rock when building gcc itself
[03:11:25] <Haohmaru> at one point, it looks to me like the makefile is attempting to run the newly built avr-gcc with arguments --dumpspecs for some reason, and that's where the build fails, but.. avr-gcc is an exe of course
[03:11:35] <Haohmaru> what am i doing wrong?
[03:14:54] <cehteh> building cross compilers is a bit complicated
[03:15:49] <cehteh> traditionally gcc used a 2 step bootstrap, first building itself with some other CC, then build itself again with the gcc just compiled,
[03:16:31] <cehteh> for cross compiling you need some magic fairy dust :D
[03:17:19] <Haohmaru> crap
[03:17:37] <Xark> Aka Canadian cross-compiling. :)
[03:17:54] <Haohmaru> yes, i remember that now.. i've tried to do that before x_x
[03:18:18] * Xark links nice diagram https://en.wikipedia.org/wiki/Cross_compiler#Canadian_Cross
[03:19:03] <Haohmaru> i initially tried to build avr-gcc with msys or cygwin, but that failed even before binutils, i couldn't build mpfr or gmp because one of them wanted aclocal-1.15 specifically
[03:19:44] <Xark> Yeah, it is always a puzzle.
[03:20:48] <cehteh> it would be really nice of gcc would support one fat compiler which can compile for all supported architectures
[03:21:03] <cehteh> just -mcpu ... and done
[03:21:10] <Haohmaru> that would be quite.. fat
[03:21:24] <Haohmaru> like, probably several gigabytes fat
[03:21:32] <Xark> cehteh: That would be cool.
[03:21:54] <cehteh> Haohmaru: not *that* much
[03:22:17] <cehteh> and gcc is already split into a frontend binary and many backends
[03:22:26] <cehteh> cc1 etc
[03:22:48] <Xark> cehteh: I suspect that may be much easier for clang/llvm folks to achieve (but they don't care much about MCUs).
[03:24:05] <cehteh> there is some work on clang-avr but i never tried it
[03:24:28] <cehteh> from what i read long time ago, the optimization falls behind and thats really important on avr's
[04:38:27] <neal777> hey guy s
[04:38:40] <neal777> can anyone help me on avr?
[04:39:31] <neal777> Torpedo Game Write a Torpedo Game program. Ships are represented as illumined LEDs on the switch light boxes, and can travel left to right or right to left. The ships can be either - Destroyer 1 LED, Battleship 2 LEDs, Aircraft Carrier 3 LEDs. The ships can appear on the LED display.
[04:39:52] <neal777> This is what I am making in AVR ATmega8535
[04:40:13] <neal777> http://collabedit.com/7nygf
[04:40:19] <neal777> there is the code ^^
[04:40:53] <neal777> caon someone help me to create 3 leads that appear one by one?
[04:40:55] <neal777> con*
[04:40:59] <neal777> can*
[04:41:47] <Haohmaru> ugh, that looks like asm
[04:42:22] <neal777> yep it is indeed asm
[04:43:47] <cehteh> uhm .. why not C :D
[04:44:10] <Haohmaru> asm is for h4x0rz
[04:44:12] <neal777> cuz they expect me to use assembly :(
[04:44:30] <cehteh> well they dont expect us to do the program for you either :D
[04:44:39] <neal777> I am asking for help
[04:44:46] <cehteh> yeah :) joking
[04:44:49] <neal777> I am not telling you to do everything
[04:44:58] <neal777> Write a Torpedo Game program. Ships are represented as illumined LEDs on the switch light boxes, and can travel left to right or right to left. The ships can be either - Destroyer 1 LED, Battleship 2 LEDs, Aircraft Carrier 3 LEDs. The ships can appear on the LED display, in random order, in random direction, and at random times. The user launches torpedoes from any one of the eight push buttons, only one torpedo can be launched per sh
[04:45:02] <cehteh> anyway, can you come up with a more specific problem?
[04:45:04] <neal777> this is the full question
[04:45:11] <cehteh> besides i am leavin soonish
[04:45:16] <neal777> but I just need help in branching and displaying
[04:45:38] <Haohmaru> and i don't know sh*t about asm
[04:45:39] <neal777> http://collabedit.com/7nygf
[04:45:46] <neal777> there is the code
[04:46:03] <neal777> I am done a bit but dont have clue :(
[04:46:39] <cehteh> i dont know much asm either, i can read it and do some stuff, but i try to avoid it
[04:47:15] <neal777> cehteh can you just help me to display 3 leds? that appear on LED Box 1 by 1?
[04:47:24] <neal777> I think I can do the rest
[04:47:29] <cehteh> what is 'LED box' a matrix?
[04:47:44] <neal777> its a box with 8 led
[04:48:07] <neal777> i need to move led one by one
[04:48:18] <Haohmaru> 8 by 8 or just.. 8?
[04:48:19] <cehteh> 8 leds in a line?
[04:48:24] <neal777> $01, $03 and $07
[04:48:27] <neal777> yeah
[04:48:35] <neal777> those are the leds value
[04:48:55] <cehteh> you have a 1:1 relation with the output port?
[04:49:09] <neal777> yep
[04:49:13] <cehteh> aka PORTB .. has 8 I'O's and these are connected to the leds?
[04:49:20] <cehteh> then this is really simple
[04:49:21] <neal777> I am using ATmega8535
[04:49:25] <Haohmaru> smells like bitshift time ;]
[04:49:36] <cehteh> you can just shift the byte with the shift intructions
[04:50:37] <neal777> I can but I need to make the code simplest as possible
[04:50:46] <cehteh> that is the simplest way
[04:50:53] <cehteh> one instruction :D
[04:51:25] <cehteh> possibly you dont even need to store the leds in a register and can use the i/o register directly
[04:51:54] <cehteh> oh you have already ror/rol ...
[04:52:03] <cehteh> i dont see the problem
[04:53:10] <neal777> yeah dont know about routines and branching
[04:53:22] <neal777> that is why I asked for help here
[04:54:07] <Haohmaru> but bitshifting isn't conditional
[04:54:34] <neal777> Lemme explain what is gonna happen in the program
[04:55:06] <neal777> Leds lit up with the hex value $01
[04:55:23] <neal777> then it moves either right or left
[04:55:42] <neal777> then leds with value $03 appear
[04:55:49] <neal777> then it moves right or left
[04:55:57] <neal777> then $07 leds value appear
[04:56:02] <neal777> then it goes right or left
[04:56:09] <neal777> that is the thing I need to do
[04:56:40] <Haohmaru> where did the 0x03 and 0x07 come from?
[04:58:02] <cehteh> neal777: protip for cheating: program it in C .. let it generate asm and look .. you dont/should not copy that 1:1, but its some inpiration for learning
[04:58:50] <Haohmaru> yeah.. i definately would ;P~
[04:59:05] <cehteh> the 0x1 0x3 0x7 are the bits for his ships 00000001 00000011 00000111
[04:59:18] <neal777> yeah
[04:59:34] <Haohmaru> okay but why did they suddenly pop into existance?
[04:59:53] <neal777> cehteh I have 0 experience in C
[04:59:56] <Haohmaru> does that happen when you move left/right?
[05:00:15] <neal777> I only know java and now I started assembly
[05:00:22] <Haohmaru> C is sort of like pseudocode ;P~
[05:00:38] <neal777> yeah but I need to finish this task in 3 days
[05:00:47] <cehteh> should be easy :D
[05:01:52] <neal777> First 00000001 appears then 00000011 and then 00000111
[05:02:12] <neal777> http://collabedit.com/7nygf
[05:02:17] <neal777> there is the code^^
[05:03:39] <cehteh> when you rotate 00000111 left then you get 00001110 ... etc
[05:03:48] <cehteh> just call that routine
[05:04:21] <cehteh> (actually i would rotate directly, makes no sense to jump for one instruction)
[05:04:33] <neal777> I need to jump
[05:04:38] <cehteh> rcall then
[05:05:11] * Haohmaru sees the asm speech and evacuates himself..
[05:06:05] <neal777> lawl haohmaru
[05:11:11] <neal777> cehteh
[05:11:24] <neal777> can you check the code now plz?
[05:11:37] <cehteh> no . prolly leaving any minute now
[05:12:23] <neal777> :|
[05:12:54] <neal777> anyway, thanks for your help cehteh.
[05:12:56] <neal777> :)
[05:22:23] <cehteh> going out canceled :D
[05:34:57] <neal777> guys, still up for help?
[05:35:03] <neal777> I have tried some shit
[05:35:07] <neal777> but it aint working
[05:35:43] <neal777> http://collabedit.com/7nygf guys click on this link to help me out
[05:35:50] <neal777> regarding assembly
[05:36:53] <cehteh> looks more like a logic problem to me. the things you need are there
[05:37:13] <cehteh> but you have some bug and it doesnt do what its intended to do
[05:38:10] <neal777> it is driving me crazy
[05:38:17] <neal777> I tried so -many way to do it
[05:38:18] <WormFood> using labels like DDRx and PORTx makes it hard to follow what is going on. Why not use descriptive labels?
[05:38:41] <neal777> Cuz our teacher aspects us to use that
[05:38:49] <neal777> he gave us the def. values
[05:39:09] <neal777> and
[05:39:15] <WormFood> neal777, I used to write a LOT of asm code, for smart cards. You know, the type in your satellite tv box. For years and years, I wrote a lot of code for those cards, all in asm.
[05:39:33] <neal777> Waaao WormFood
[05:39:42] <neal777> nice! can you help me out there : P
[05:40:02] <WormFood> I don't do much in AVR asm, but I've done it before. Honestly, the C compiler is so fuckin' awesome, I feel there is no need to use asm.
[05:40:36] <WormFood> seriously, I comparing my C code, to the asm it generates, and I was truly impressed.
[05:40:37] <neal777> Indeed
[05:41:04] <WormFood> That suggestion to use C, and see what asm it generates, and then you have an idea of how to do it, is an excellent suggestion.
[05:41:09] <neal777> please help me out
[05:41:22] <neal777> i have 0 idea of c
[05:41:28] <WormFood> If you say "I know how to do this in C", then make a test snippet of code, and compile it, and see how it does it
[05:41:28] <neal777> I am a noob. :|
[05:41:35] <WormFood> What programming languages do you know?
[05:41:40] <neal777> Java.
[05:41:47] <neal777> and now I am working on this shit
[05:41:52] <neal777> Assembly
[05:41:55] <WormFood> That's not a programming language, Java is a joke.
[05:41:59] <neal777> i know php little bit
[05:42:03] <neal777> hahahhaha lawl
[05:42:19] <neal777> its Object Oriented
[05:42:55] <WormFood> Both PHP and Java use C syntax. It's slightly different in some places, but largely, your skills there can help get a leg up on C.
[05:43:26] <WormFood> C is an extremely low level language. One step away from asm.
[05:43:41] <neal777> yeah i know that but I really dont have time to learn C
[05:43:42] <WormFood> What problem are you having?
[05:43:48] <neal777> i need to finish this stuff in 3days
[05:44:10] <cehteh> you really have to read that asm manual then
[05:44:16] <WormFood> It sounds like you need to buckle down, and get to work, and stop playing around on IRC ;P
[05:44:19] <cehteh> i thats pretty doable in 3 days
[05:44:24] <cehteh> ack
[05:44:39] <neal777> I am on IRC for help
[05:44:43] <neal777> not to play around
[05:44:58] <WormFood> And, what do you need help with?
[05:45:00] <WormFood> be specific.
[05:45:17] <neal777> Write a Torpedo Game program. Ships are represented as illumined LEDs on the switch light boxes, and can travel left to right or right to left. The ships can be either - Destroyer 1 LED, Battleship 2 LEDs, Aircraft Carrier 3 LEDs. The ships can appear on the LED display
[05:45:27] <neal777> that is the bit i need help on
[05:45:28] <WormFood> I've read that before. It's not specific.
[05:45:34] <neal777> ok
[05:45:39] <neal777> firstly,
[05:45:53] <WormFood> Also, I don't have any idea what hardware you have connected, or where.
[05:45:59] <neal777> I have 8 bit ATMega8535 machine
[05:46:03] <WormFood> You have switches and leds, I presume. But I'm just guessing.
[05:46:05] <neal777> and 8 bit led
[05:46:24] <neal777> lemme send you a pic
[05:46:27] <neal777> 2 min
[05:46:43] <WormFood> Don't use some gay site, like collabedit. I'm in China. Tons of shit sites are blocked here.
[05:47:11] <WormFood> You should be able to dcc send me, if needed.
[05:47:33] <neal777> dcc?
[05:47:36] <WormFood> I'm guessing you don't have much experience in software development.
[05:47:40] <WormFood> or irc
[05:47:41] <WormFood> :P
[05:47:43] <neal777> hahaha
[05:47:47] <neal777> I am a noob
[05:48:10] <cehteh> WormFood: does imgur work for you?
[05:48:14] <Lambda_Aurigae> http://www.avr-asm-tutorial.net/avr_en/
[05:48:15] <WormFood> Usually
[05:48:28] <Lambda_Aurigae> I learned avr assembly in 2 days from that site back in,,,2001 or so.
[05:48:35] <WormFood> AVR asm is pretty straight forward.
[05:48:50] <cehteh> yes, risc is somewhat simple
[05:48:55] <cehteh> and the task is simple too
[05:48:55] <WormFood> Well, I already had experience in 68xx and 68xxx asm, before learning avr asm.
[05:49:08] <WormFood> The task sounds straight forward.
[05:49:09] <cehteh> but i cant help much i would have to learn it too
[05:49:17] <cehteh> so just learn it yourself in the first place
[05:49:24] <Lambda_Aurigae> WormFood, hehe..yeah, I had experience with 6502, 68000, x86, and pic before learning avr.
[05:49:29] <WormFood> First task, is to break down the problem
[05:49:38] <WormFood> I never programmed a 6502 in asm
[05:50:12] <Lambda_Aurigae> WormFood, 6502 and avr are rather similar...at least, some crossovers and the simplicity
[05:50:14] <WormFood> or x86...but I've reverse engineered x86 code, and modified it. I can mostly understand it, but have no interest in writing it.
[05:50:32] <WormFood> the 65xx family, is mostly a rip-off of the 68xx family.
[05:50:42] <Lambda_Aurigae> I did 6502 on commodore vic-20 and apple-II
[05:50:48] <Lambda_Aurigae> becasue
[05:50:54] <Lambda_Aurigae> because basic was boring me.
[05:51:08] <WormFood> I learned 6809 on my tandy color computer, back in the mid 80s.
[05:51:43] <WormFood> But I didn't really write any software in 6809 asm. I just modified other software (I hacked my floppy drivers to support 4 double sided drives)
[05:52:24] <neal777> http://tinypic.com/r/6h1apk/9
[05:52:25] <neal777> http://tinypic.com/r/6h1apk/9
[05:52:50] <WormFood> When I started smart card programming, in the early years of 200x, all my 6809 stuff that I learned, came back to me, and I was writing code for it in no time.
[05:53:12] <Lambda_Aurigae> so, neal777, you will need a random number generator(not so easy but doable), a routine to pick the type of ship, a routine to pick the direction of travel, a display routine, and a routine to read a button to fire the torpedo I'm guessing.
[05:53:14] <WormFood> The 6805 and 6809 are similar enough, that if you know one, the othe ris trivial to learn
[05:53:51] <neal777> yeah but I am asking for help to make the leds only
[05:54:03] <neal777> i think I can do buttons and buzzers
[05:54:07] <Lambda_Aurigae> what port are the LEDs connected to?
[05:54:18] <neal777> led to PortC
[05:54:45] <Lambda_Aurigae> well, it's an 8bit port...you use an 8bit number...think in binary... 00000000 for nothing
[05:54:51] <neal777> yeah
[05:54:59] <neal777> http://collabedit.com/7nygf
[05:55:04] <neal777> check this
[05:55:05] <Lambda_Aurigae> 00010000 or 00001000 is a single bit
[05:55:08] <WormFood> so, if I understand correctly, you are to flash the leds across the display, to simulate a ship passing by, and the user is supposed to press the button, corresponding to shooting the ship?
[05:55:09] <neal777> this is my prgress
[05:55:22] <Lambda_Aurigae> what the fuck is collabedit?
[05:55:23] <neal777> yeah
[05:55:33] <Lambda_Aurigae> it wants me to enter my name just to read it?
[05:55:34] <Lambda_Aurigae> no thanks.
[05:55:36] <neal777> Finally you understood it
[05:55:46] <neal777> just type hfuydsg
[05:55:49] <neal777> as your name
[05:55:50] <Lambda_Aurigae> I understood it long time ago.
[05:55:52] <skz81> lambda : it's a pseudo for chat
[05:55:55] <skz81> Lambda-Aurigae,
[05:56:04] <neal777> put abcd as your name
[05:56:05] <neal777> lawl
[05:56:15] <Lambda_Aurigae> I prefer not to put anything and ignore it.
[05:56:24] <neal777> :(
[05:56:29] <Lambda_Aurigae> it's too early in the morning to look at code.
[05:56:34] <WormFood> There are lots of different ways to handle this.
[05:56:35] <Lambda_Aurigae> I'm eating breakfast and typing on irc.
[05:56:38] <neal777> ohh please
[05:56:43] <neal777> help me
[05:56:49] <Lambda_Aurigae> I'm trying to help you.
[05:56:49] <neal777> finish your breakfast
[05:56:55] <Lambda_Aurigae> but i'm not going to write your code for you.
[05:56:56] <neal777> then look :)
[05:57:01] <neal777> yes
[05:57:05] <WormFood> First task, is to decide how to do everything.
[05:57:26] <twnqx> after finishing, realize you made the wrong decision, snad start over.
[05:57:33] <neal777> I have decided to do by sequence
[05:58:05] <Lambda_Aurigae> I would write either 11100000 or 00000111 to port C then use LSL or LSR to shift the display left or right.
[05:58:27] <neal777> finish your breakfast and look what i have done
[05:59:07] <neal777> please look at it once
[05:59:15] <neal777> you will know
[06:00:32] <Lambda_Aurigae> ok..first, it is spelled Initialize, not Initialise
[06:01:06] <neal777> bro British English?
[06:01:07] <neal777> xD
[06:01:08] <Lambda_Aurigae> where do you get 3 LEDs for $03?
[06:01:16] <neal777> ahh 2
[06:01:27] <neal777> it should be 2 for $03
[06:01:32] <neal777> lemme correct it
[06:02:26] <Lambda_Aurigae> so you have code...what is the specific question?
[06:02:57] <neal777> the specific question is that I am trying to make the 3 leds display one by one
[06:03:06] <neal777> one will rol
[06:03:14] <neal777> one will lsl
[06:03:35] <Lambda_Aurigae> have you bothered to look at how lsl works?
[06:03:48] <Lambda_Aurigae> http://www.atmel.com/webdoc/avrassembler/avrassembler.wb_LSL.html
[06:03:59] <Lambda_Aurigae> and rol
[06:04:15] <Lambda_Aurigae> use the carry flag C
[06:04:16] <neal777> logical shift left
[06:04:19] <Lambda_Aurigae> put a 1 in C
[06:04:22] <Lambda_Aurigae> do an ROL
[06:04:30] <neal777> rol or ror
[06:04:30] <Lambda_Aurigae> it will rotate 1 bit into the register.
[06:04:42] <Lambda_Aurigae> put a 1 in C again
[06:04:55] <neal777> ahh it has carry?
[06:04:56] <Lambda_Aurigae> ROL again..you get another 1 into the register with the first shifted over.
[06:05:01] <Lambda_Aurigae> it's right in the documentation!
[06:05:26] <neal777> yeah
[06:05:37] <Lambda_Aurigae> I suggest reading the documentation thoroughly.
[06:05:56] <Lambda_Aurigae> http://www.atmel.com/images/atmel-0856-avr-instruction-set-manual.pdf
[06:06:44] <neal777> I have that printed out right infront of me
[06:07:23] <Lambda_Aurigae> page 112
[06:07:26] <Lambda_Aurigae> ROL
[06:07:30] <Lambda_Aurigae> rotate left through carry
[06:08:48] <Lambda_Aurigae> and you can use CLC to clear the carry flag or SEC to set the carry flag.
[06:09:16] <neal777> yeah
[06:09:28] <neal777> I have full instruction set if front of me
[06:09:41] <neal777> but still I cannot make the secquence right
[06:09:59] <Lambda_Aurigae> set the port to 0x00
[06:10:04] <Lambda_Aurigae> set the carry bit
[06:10:09] <Lambda_Aurigae> rol the port
[06:10:12] <Lambda_Aurigae> set the carry bit
[06:10:14] <Lambda_Aurigae> rol the port
[06:10:17] <Lambda_Aurigae> set the carry bit
[06:10:18] <Lambda_Aurigae> rol the port
[06:10:20] <Lambda_Aurigae> rol the port
[06:10:24] <Lambda_Aurigae> rol the port
[06:10:29] <Lambda_Aurigae> rol the port
[06:10:31] <Lambda_Aurigae> rol the port
[06:10:51] <WormFood> First, learn how to ask questions. We've ALL said, "be specific" or "be more specific", and not once, have you given us any details about the problems you're having.
[06:10:59] <Lambda_Aurigae> the last 3 should really be lsl rather than rol so you don't have your ship rotating around to the other end.
[06:11:55] <WormFood> What are you trying to do? What is it doing? What do you expect/desire it to do?
[06:13:27] <Lambda_Aurigae> perhaps your teacher needs to go back and go over the instruction set and what each instruction does and how it works.
[06:13:29] <neal777> I desire the leds $01, $03 and $07 to go one by one in different direction
[06:13:34] <Lambda_Aurigae> before giving an assignment.
[06:13:34] <neal777> 01 goes to the left
[06:13:41] <neal777> 02 goes to the right
[06:13:46] <neal777> 03*
[06:13:49] <Lambda_Aurigae> instead of using rol, use ror
[06:13:57] <Lambda_Aurigae> I just told you the sequence
[06:14:13] <Lambda_Aurigae> rol/lsl for left...ror/lsr for right.
[06:14:20] <WormFood> Lambda_Aurigae, How do you know the LEDs aren't using negative logic?
[06:14:53] <Lambda_Aurigae> WormFood, I don't...but that complicates things not at all...invert your logic...load 0xFF into the register and clear the carry flag rather than set.
[06:15:34] <neal777> hhmmm
[06:16:15] <Lambda_Aurigae> chaos, panic, disorder..my job here is done.
[06:16:16] <WormFood> neal777, http://catb.org/~esr/faqs/smart-questions.html have you read this before? If not, I suggest you read it, asap. If you have read it before, I suggest you read it again, asap.
[06:16:17] <Lambda_Aurigae> time to go to work.
[06:16:23] <neal777> I am thinking about using Breq
[06:16:35] <neal777> to make sequence
[06:16:52] <WormFood> Who is Breq? Is he gonna program it for you? ;)
[06:18:44] <neal777> breq branches if equal
[06:19:04] <neal777> lambda, is it better to cpi and breq?
[06:19:20] <WormFood> You only seem to be worried about the LEDs. What about the buttons?
[06:19:27] <WormFood> Did you even make a flow chart of your program logic?
[06:20:30] <neal777> button is easy
[06:20:37] <neal777> that is why I am not asking about the buttons
[06:21:11] <neal777> for buttons I AND the value of led register with the input button register
[06:21:26] <neal777> and the and result is one
[06:21:28] <neal777> bam
[06:21:36] <WormFood> what stops the user from just holding down the button?
[06:21:59] <neal777> its one press button only
[06:22:10] <neal777> I dont really need validation
[06:22:24] <neal777> I just need to make it sure that program actually works
[06:22:33] <WormFood> if I play your game, and I hold down all 8 buttons at the same time, how will it act? I think I'll win every game
[06:22:59] <neal777> ohh only one of the button will work
[06:23:02] <neal777> not all xD
[06:24:05] <WormFood> I think you'll be in for a big surprise
[06:24:18] <WormFood> Did you flowchat this program first?
[06:25:42] <neal777> WormFood, I have 3 days to do this program
[06:25:51] <neal777> no time for flow chart
[06:25:57] <WormFood> what the fuck dude?
[06:26:05] <WormFood> You know absolutely nothing about software development.
[06:26:16] <WormFood> Why do you think programmers make a flow chart in the first place?
[06:26:21] <WormFood> You think they're just killing time?
[06:26:28] <WormFood> no, that is the program logic.
[06:26:36] <neal777> to know what to do in each step
[06:26:46] <WormFood> That flowchart is your road map.
[06:27:04] <WormFood> Then why are you here, begging for help, instead of doing what you know you need to do in each step?
[06:27:18] <WormFood> When I asked what your specific problem was, you just copy/pasted your assignment.
[06:27:40] <neal777> I pasted where I needed help
[06:28:00] <neal777> I first pasted the led questions
[06:28:05] <neal777> not the buttons one
[06:28:12] <WormFood> Your questions are vague.
[06:28:19] <WormFood> And, they've been answered a long time ago.
[06:28:51] <neal777> I have tried what I Lamba said
[06:29:06] <neal777> ror and lsl
[06:29:08] <neal777> used
[06:29:16] <neal777> but the point it with branching
[06:29:29] <neal777> is*
[06:29:55] <neal777> anyway, I will try to do something about it. Thank you for your support!
[06:31:12] <WormFood> If you want help, BE SPECIFIC. Also, he didn't say "lsl". You said that.
[06:31:54] <WormFood> You need to read over the description of how those commands work, and what exactly they're doing. Go back, and see what Lambda_Aurigae said, and look at your instructions, and try to make sense out of it.
[06:32:05] <WormFood> If you can't figure it out, ask specific questions.
[06:32:36] <neal777> i am looking at the instructions
[06:42:20] <WormFood> I think you should be using LSL and LSR. That always moves in a 0 bit, and moves the last bit out to C
[06:42:32] <WormFood> which can be discarded
[06:51:20] <neal777> yeah
[06:51:31] <neal777> I have used those and it moved
[07:59:03] <neal777> guyds
[07:59:06] <neal777> guys
[07:59:23] <neal777> How to go out of loop in avr assembly?
[08:00:37] <LeoNerd> ??
[08:07:16] <cehteh> test and branch as in any other assembly/loop
[08:13:45] <neal777> i dont know how to branch lawl
[08:14:55] <LeoNerd> Then why are you writing raw assembly?
[08:15:28] <neal777> cuz I need to
[08:15:42] <neal777> this branching stuff is hard
[08:15:54] <neal777> and without branching the subroutines
[08:16:02] <neal777> its nearly hard to do
[08:35:28] <WormFood> satisfy the conditions of the loop
[08:50:11] <bss36504> LeoNerd: So I managed to rewire my brake light and use the USI (btw, the USI sucks). My refresh rate is much higher now, I can actually do controlled dimming/sequencing without any flicker. When I was bitbanging the packets, it took 760us to send one. Now with the USI it takes about 30us (including the bit banged signals after the USI packet).
[08:50:40] <LeoNerd> Eh.. the USI sucks for being an I²C slave, yah. Well, general slave.
[08:50:46] <LeoNerd> It's good as a master though
[08:52:17] <Haohmaru> receiving is always moar nasty than transmitting
[08:55:59] <bss36504> I'm not really a fan of the clocking options for it. I miss my real SPI module
[08:56:13] <bss36504> I went with the software strobe and it seems fast enough, though
[08:56:21] <LeoNerd> Yes the clocking is interesting
[08:56:33] <LeoNerd> The various options.. takes a little while to work out what's required
[08:57:18] <LeoNerd> I quite like the flexibility. I wish more AVR periphs were like that
[08:57:29] <LeoNerd> I've occasionally wanted to use another timer unit as the USART clock
[08:58:09] <LeoNerd> It might be nicer to have more visible timers, and separate off from them the PWM/WGM units.. more flexible routing of clock signals into PWMs, USART, ADC, USI,...
[08:58:15] <LeoNerd> But that's just my pipedream
[08:58:47] <WormFood> Do you know what "pipedream" was originally referring to?
[08:59:00] <LeoNerd> Hmm... no
[08:59:02] <WormFood> Opium smokers.
[08:59:36] <WormFood> I've never tried smoking opium, but based on that expression, I can guess what it can do.
[08:59:56] <LeoNerd> Ah.. hmm
[09:00:39] <Haohmaru> sniff sniff ;]
[09:01:49] <LeoNerd> butyeah, I really want a full crossbar
[09:01:55] <LeoNerd> Unlikely to happen
[09:02:15] <LeoNerd> I suppose I could have bought Atmel instead of Microchip doing that.. then I get to dictate direction
[09:02:20] <LeoNerd> I didn't *quite* have the spare cash though
[09:02:22] <bss36504> LeoNerd: Yes, it seems like a good idea, what they've done. I was not a fan of the ambiguity around the clock selections titled "Timer/Counter0 compare match". Apparently that actually means the overflow? Unless I'm mistaken. Either way, there are two compare channels, so I have no clue which one it would use, since it doesnt say.
[09:02:37] <LeoNerd> Mm.. yes. that part :)
[09:02:39] <LeoNerd> I've never used it
[09:03:01] <LeoNerd> The other interesting design shape about the USI is that it's quite easy to get the shift register and the counter out of sync.
[09:03:15] <LeoNerd> If you use the wrong combination of bit flags and toggles, you can bump the counter without shifting the SR
[09:03:17] <bss36504> When I read it, i was like "Cool, I'll just set the compare value to 1". But no :(
[09:03:23] <bss36504> oh that's interesting.
[09:03:43] <LeoNerd> Istill want a "direction" bitflag, also :(
[09:03:56] <LeoNerd> UART over USI would be so much easier if we could clock it LSB-first
[09:04:00] <bss36504> Oh, like MSB first/LSB first?
[09:04:03] <LeoNerd> Yah
[09:04:17] <bss36504> That would be nice. I noticed it's absense.
[09:04:27] <LeoNerd> UART goes LSB-first; real AVR SPI units are switchable; I²C and "normal" SPI are MSB-first
[09:04:37] <LeoNerd> So the USI does MSB-first, making UART harder over it
[09:04:54] <bss36504> Yeah, you'd have to do some endian-ness swapping in software. How does the hive mind here feel about the microchip aquisition?
[09:05:12] <LeoNerd> I don't really know enough to have an opinion
[09:05:32] <LeoNerd> I have lots of "I hope they do/don't do ..." but I have no basis to guess how likely those are
[09:07:47] <bss36504> I have never really been a fan of Microchip, but it doesnt seem like they want to kill off atmel so I'll be content for now. It would be cool to get some DSP capable atmel products or something. Maybe kill of the shitty old 8-bit stuff MCP has in favor of atmel's.
[09:08:49] <LeoNerd> Things I'd like to see on an AVR chip: PIC24-style peripheral crossbar; DAC; more flexible separation of timer counters vs. PWM units; more USB
[09:09:00] <LeoNerd> Things I don't want to see Atmel do: closed-only development tool environment
[09:09:18] <LeoNerd> avr-libc+avr-gcc+avrdude beats the /pants/ off anything Microchip do for PIC development
[09:09:25] <LeoNerd> So I hope that continues to exist
[09:10:17] <bss36504> Yes, I 100% agree
[09:12:26] <bss36504> Say, so as a thought experiment, I was wondering what it would be like to route the land pattern for a 0.35mm pitch, 16-ball WLCSP on the OSHPark design rules. Technically, you could have pads for all the balls, but they would be super tight and escaping between pads impossible. So, what if the center 2x2 pads were actually vias. Only issue would be the solder from the balls being sucked through the vias. Any thoughts? worth a try?
[09:13:13] <LeoNerd> Is escape impossible there even on the 4layer service?
[09:13:17] <LeoNerd> 6mil/6mil on that
[09:14:21] <LeoNerd> What if you use square land pads rather than circular?
[09:14:36] <LeoNerd> Does that let you use a slightly smaller pad on the edge, enough to let the centre traces out?
[09:20:53] <bss36504> Oh wait, it would be impossible to do via in pad because the via outer diameter is 20mils, 0.35mm = 13mil. So thats no good. Oh well
[09:29:12] <twnqx> bss36504: don't do via-in-pad anyway, unless you can get plated vias
[09:29:53] <twnqx> and even then i'd stick to lasered microvias in 4+ layer stackups
[09:29:59] <LeoNerd> I think for four inner ones it might not be so bad. The main trouble is it sucks all the solder paste out
[09:30:31] <bss36504> twnqx: Oh I know the risks associated with it, but I wouldnt be trying to manufacture these boards so I could work around some of the hassles that normally crop up. But its a moot point, because I'm too cheap to buy a board on a process that could support CSPs\
[09:31:01] <LeoNerd> (CSP in this context?)
[09:31:10] <twnqx> but can't 16 balls be escape routed anyway with .2mm?
[09:31:15] <bss36504> (Chip scale package)
[09:31:17] <twnqx> or do you need .15...
[09:31:18] <Jartza_> chip scale package?
[09:32:01] <bss36504> twnqx: not on an 8mil/8mil process
[09:32:13] <bss36504> even 6/6 would be imposible.
[09:32:14] <twnqx> i am wrong anyway, my example here uses 0.075mm
[09:32:22] <twnqx> with is ~3
[09:32:31] <bss36504> oh jeez thats pretty tight
[09:33:38] <bss36504> I do, however, wish that there was an OSHPark-like service that more readily supported the "advanced" PCB processes like blind/buried vias, vias smaller than 13mil drill, sub 6mil traces and spacing. I'd even comprimise on some of those, if only I could reliably escape route BGAs with tight pitch
[09:34:09] <twnqx> bah, compromises.
[09:34:09] <bss36504> Unfortunately, the wide pitch BGAs have 256+ balls on them, and the low ball count ounese are .35mm spaced. No Bueno.
[09:34:29] <twnqx> yeah, .35 is pretty harsh
[09:34:52] <bss36504> Also, if it looks like Im making these numbers up, I'm specifically looking at FPGAs. I want a small FPGA that is BGA, but doesnt have 8 trillion connetions.
[09:35:02] * bss36504 stomps foot
[09:35:06] <twnqx> ;) i know that feeling
[09:35:17] <twnqx> did you look at igloo nanos yet?
[09:35:57] <twnqx> if you feel you can stray from the well known altera and xilinx ones
[09:38:06] <bss36504> I was looking at lattice, I had not looked at the igloos. Xilinx and their super cool chips that are impossible to layout haha
[09:38:26] <twnqx> so far i only used tqfps from them :P
[09:38:48] <bss36504> I would love to be able to use a top-tier xilinx BGA in a design, but I'll be stuck with QFPs for a while, unless someone else is buying the PCB
[09:39:13] <twnqx> i'd be more scared of soldering 15k€ chips P
[09:39:21] <twnqx> :P
[09:40:34] <bss36504> haha very true. I guess in that case I'd settle for a spartan 6. No Zynq for me :)
[09:42:10] <rue_house> hmm I think I have some spartin laying around
[09:42:20] <rue_house> on boards
[09:42:35] <twnqx> kintex GO
[09:42:42] <rue_house> with regulators, buffers, and clocks
[09:54:54] <hetii> Hi :>
[09:57:30] <Jartza> hallo
[10:07:03] <rue_house> what are you building?
[10:12:46] <t4nk840> guys anyone willing to do Assembly work for money?
[10:12:50] <t4nk840> its not C
[10:12:56] <t4nk840> its assembly stuff
[10:13:26] <rue_house> I have no time, what is the code to do?
[10:13:39] <t4nk840> how much?
[10:13:50] <t4nk840> my budget is $30 to 50
[10:14:01] <t4nk840> I think it is alright code as well
[10:14:04] <rue_house> what does the code need to do?
[10:14:10] <t4nk840> lemme
[10:14:14] <t4nk840> wait a sec
[10:14:20] <rue_house> do you want to run windows 10 on an atmega32?
[10:14:38] <jacekowski> wait?
[10:14:45] <jacekowski> $40/50 per hour?
[10:14:46] <jacekowski> or total?
[10:14:51] <t4nk840> total
[10:14:56] <jacekowski> rotfl
[10:14:58] <t4nk840> I think its 1hr work anyway
[10:14:59] <rue_house> jacekowski, t4nk840 wants to run windows 10 on an atmega32
[10:15:02] <t4nk840> 1 and half I guess
[10:15:27] <jacekowski> sounds like homework
[10:15:35] <t4nk840> It is a task
[10:15:43] <t4nk840> that we are doing as a group
[10:15:50] <t4nk840> but its too late
[10:16:09] <t4nk840> so I just decided
[10:16:13] <t4nk840> to do this
[10:17:03] <t4nk840> brb I will be here in 5 to 6 hours
[10:17:07] <t4nk840> |I need to go
[10:17:12] <t4nk840> but that is the thing
[10:17:25] <Strangework> What is this about? :P
[10:17:32] <cehteh> why is assembly a requirement ..
[10:17:50] <t4nk840> guys sorry but I need to go
[10:17:56] <t4nk840> i will let you know later
[10:18:02] <t4nk840> 5 to 6 hours
[10:18:09] <t4nk840> rue house
[10:18:16] <t4nk840> I will see you in 5 to 6 hours
[10:18:19] <t4nk840> if you can do it
[10:18:30] <t4nk840> I will see you that time
[10:18:31] <rue_house> I can do anything, I wont cause I dont have time
[10:18:54] <hetii> lol :)
[10:19:27] <cehteh> i bet that the task takes only 1 hour was wishful thinking
[10:19:36] <rue_house> and I'm filtering out tasks that dont contribute to turning myself into a robot and taking over the world
[10:20:38] <rue_house> why not just make a game I like, like tetris?
[10:22:07] <rue_house> is a C cell longer or shorter than an AA cell?
[10:22:14] <rue_house> I thinkits shorter...
[10:22:24] <LeoNerd> wikipedia "list of common battery sizes"? ;)
[10:22:27] <skz81> I wonder how many time it takes to find and hire a developper online, then integrate its work into the whole project.
[10:22:49] <skz81> or a one-hour code development, does it worth it ?
[10:23:00] <skz81> is that worth it*
[10:27:51] <cehteh> its not 1 hour
[10:28:20] <cehteh> its "i dont know how to do it, but i would only spend one hour on it"
[10:28:46] <bss36504> How could they hope anyone could do a coding project in 1 hour without the hardware? That seems asinine. Just bringing your contractor up to speed might take an hour.
[10:47:39] <bss36504> http://www.ragingcomputer.net/chatstats/freenode_avr.html
[10:47:47] <bss36504> neat :)
[10:48:24] <rue_house> well thats part II of the bill
[10:48:31] <rue_house> give them the hardware design for the code
[10:48:56] <rue_house> ;)
[10:49:12] <bss36504> haha good point. It sounded a lot like a school project
[10:49:34] <bss36504> might as well just contract the whole thing out
[10:52:24] <cehteh> i talk too much
[11:57:19] <skz81> cehteh, what was your proposition/trick to fasten ISR execution ? I forgot to note it down yesterday
[11:57:47] <cehteh> make it 'naked' .. possibly implement it in assembler
[11:58:14] <skz81> Ok, in C there is no way to do it ?
[11:58:57] <cehteh> http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html#ga8b4c7e44627db0a60d676213add42d64
[11:59:08] <cehteh> with some care one can do that in C
[11:59:55] <cehteh> but at least you need to check the generated assembler
[12:00:22] <skz81> very nice ! Thank you :)
[12:00:29] <cehteh> i usually write it in C and then inline the generated assembler, maybe fix things
[12:00:54] <cehteh> because compiler may decide the next time to optimize it differently which then breals
[12:02:07] <skz81> I'm not affraid of writing directly my ISR in assembly :) (and knew it was a way to acheive this goal) My question was to extend my general AVR knowledge :)
[12:03:20] <skz81> I was not aware of this doc on non-GNU site, BTW.
[12:03:23] <cehteh> well whats takes the most (unpredictable) time in ISR's in C is saving and restoring the registers
[12:03:28] <skz81> It seems well-written, thanks for that too !
[12:03:38] <cehteh> thats the official avr-libc doc
[12:04:46] <cehteh> you always have 6 clock cycles for the ISR .. plus whatever your program does, gcc compiles to good asm, but saving regs is often a bit shabby
[12:05:01] <cehteh> i tihnk that improved too
[12:05:24] <cehteh> if you write C in the first place which only uses predefined registers and no temporaries then you are prolly fine too
[12:05:36] <cehteh> you can bind some variables to registers
[12:06:06] <cehteh> thats a but dangerous because the registers become unavailable for other things, but sometimes right what one needs
[12:07:06] <skz81> <cehteh> thats the official avr-libc doc >> not exactly the same i'm used to check : http://www.atmel.com/webdoc/AVRLibcReferenceManual/group__avr__interrupts.html
[12:07:17] <cehteh> register uint8_t step asm("r2");
[12:07:48] <cehteh> for example
[12:07:57] <cehteh> atmel cloned it :D
[12:13:48] <dsal> Random question: Does anyone know anything about digispark? I can't seem to get stuff blinking on one outside of Arduino.
[12:14:38] <dsal> I assume there's some weird magic going on in the IDE somewhere to make code work. I found a blog post some guy wrote a while back showing how to do plain avr-gcc stuff, but that code also doesn't work for me.
[13:30:15] <cehteh> hah .. my documentation system makes progress
[13:31:16] <cehteh> if one tags something in the source with //FIXME: blah ... then it produces things like http://public.pipapo.org/muos_issues.html
[13:31:25] <cehteh> .. with a little git-blame help :)
[23:50:38] <MarkX> hi
[23:50:47] <WormFood> 你好
[23:51:52] <Lambda_Aurigae> I can draw squiggly lines too...they just don't translate across irc.
[23:52:06] <Lambda_Aurigae> then I have to take some alcohol to get the magic marker off the screen.
[23:52:18] <MarkX> i had a question about usb (currently using an atmega32u4 but it applies to USB in general). If i have an isochronous endpoint and i start a an iso transfer with it, my host app will basically open the pipe for the communication.
[23:52:34] <Casper> 馬鹿 not the same language, but hey, I can paste them too! :D
[23:52:52] <WormFood> I didn't paste them. I just typed it in directly.
[23:53:16] <MarkX> what happens after my first data message is received by the host app? do i have to initialize the iso transfer again? or can the app essentially wait for a stream of messages infinitely ?
[23:54:03] <Lambda_Aurigae> dunno.
[23:54:14] <Lambda_Aurigae> never done isosync stuff.
[23:54:28] <Lambda_Aurigae> mostly hid and cdc.
[23:55:12] <MarkX> k
[23:55:27] <MarkX> does abc_miniuser (Dean) still hang around here?
[23:58:12] <Lambda_Aurigae> on and off.