#avr | Logs for 2015-08-17

Back
[00:18:49] <ferdna> .
[06:59:49] <Jartza> https://www.dropbox.com/s/22fu2fzvnzxhqyt/Video_Zip_20150817_142923.mp4?dl=0
[06:59:52] <Jartza> so there.
[07:00:03] <Jartza> not-so-ugly-quality-video
[07:00:40] <Lambda_Aurigae> morning
[07:01:26] <Lambda_Aurigae> nice
[07:01:36] <Lambda_Aurigae> that last display shows the colors properly.
[07:01:41] <Jartza> yeah
[07:02:17] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxVEgtMjREbmVpX0k/view
[07:02:21] <Jartza> this shows them even better :)
[07:02:29] <Lambda_Aurigae> yeah.
[07:02:43] <Lambda_Aurigae> already passed that on to others to show what you are doing.
[07:02:48] <Jartza> just made this quick'n'dirty'n'ugly python-script that floods something to uart
[07:03:05] <Jartza> the ansi-escapes and uart seem to work nicely
[07:03:22] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxR1lWcjNZdjBVcms/view
[07:03:27] <Jartza> also cleaned up the breadboard a bit :)
[07:04:13] <Lambda_Aurigae> first I've seen of the circuit.
[07:04:16] <Jartza> about the cable coding... we have H and V sync, using grey and white cable it's very easy to remember those
[07:04:24] <Lambda_Aurigae> I see you are using an oscillator rather than a crystal on the chip.
[07:04:37] <Jartza> grey = Harmaa and white = Valkoinen in finnish :)
[07:04:43] <Jartza> so H and V :)
[07:04:47] <Lambda_Aurigae> hehe.
[07:05:12] <Lambda_Aurigae> I like the vga connect too.
[07:05:12] <Jartza> yeah, using oscillator as I'm chaining the same clock from chip to other
[07:05:24] <Jartza> so I need the clock-out pin too
[07:05:28] <Jartza> can't use crystal
[07:05:51] <Lambda_Aurigae> yup.
[07:05:52] <Jartza> and the syncing of the three chips happens only in boot
[07:06:05] <Lambda_Aurigae> and they don't seem to get out of sync at all so that's good.
[07:06:09] <Jartza> after that I'm relying on the fact that they run with the same clock
[07:06:27] <Jartza> well, this has been running now for around 12 hours without losing sync
[07:06:29] <Lambda_Aurigae> 5V power?
[07:06:36] <Jartza> yeah
[07:06:49] <Lambda_Aurigae> definitely include a breadboard shot in your blog.
[07:06:54] <Lambda_Aurigae> and a schematic.
[07:06:58] <Jartza> of course
[07:07:03] <Jartza> maybe even PCB :)
[07:07:03] <Lambda_Aurigae> ever use fritzing to do breadboard layouts?
[07:07:15] <Jartza> haven't tried that, no
[07:07:16] <Lambda_Aurigae> a single sided pcb would be awesome too.
[07:07:31] <Jartza> I even had that arduino-shield in mind
[07:07:39] <Lambda_Aurigae> it's basically a breadboard layout editor...kinda nifty.
[07:07:41] <Jartza> because it seems other devboards have adapted those headers too
[07:07:46] <Jartza> those buggy headers
[07:07:48] <Lambda_Aurigae> multiple OS support too.
[07:08:08] <Jartza> nucleo boards have the same headers and now it seems freescale has some devboards with arduino headers too
[07:08:51] <Lambda_Aurigae> years ago I designed a multiple board carrier thingie and various boards using 30pin simm sockets...then someone else beat me to making something similar....they never took off though.
[07:09:10] <Jartza> yeah
[07:09:21] <Jartza> it's a bit pity that arduino headers became "industry standard"
[07:09:35] <Lambda_Aurigae> might have to redo it with a double row header on one end of the board.
[07:09:41] <Jartza> with that stupid gap between headers (.05" gap or something )
[07:09:46] <Lambda_Aurigae> then make up a backplane board and all.
[07:10:29] <Lambda_Aurigae> 40 pin header with missing key pin....ide cable!
[07:10:48] <Fleck> Jartza: nice one! :)
[07:11:25] <Jartza> Lambda_Aurigae: heh, nobody uses ide cables anymore, so there are plenty of unused in storage :)
[07:11:28] <Jartza> Fleck: thanks :)
[07:11:30] <Lambda_Aurigae> yup.
[07:11:38] <Lambda_Aurigae> I have boxes of them.
[07:11:40] <Jartza> and yeah. using one attiny85 and code for "master", you get b/w
[07:12:27] <Lambda_Aurigae> ok...here's a question that likely hasn't been asked of your vga display yet Jartza
[07:12:37] <Jartza> shoot :)
[07:12:38] <Lambda_Aurigae> if you offset the color timing can you get it to do 3D?
[07:12:47] <Jartza> heh
[07:12:49] <Lambda_Aurigae> :}
[07:12:55] <Jartza> I guess so
[07:13:47] <Lambda_Aurigae> ok..time for me to go to w*rk.
[07:14:06] <Jartza> have a nice workday
[07:14:12] <Jartza> I need to do some work too
[07:17:29] <Fleck> ltf did 3d on atmega8 I think
[07:18:02] <Fleck> ahh, that was atmega88
[08:25:18] <tlab_> I have an avr dragon I have not used in a long time, when I try to update the firmware with studio6 it fails.. It did connect to it and said it had 6.b firmware and needed updated... but now it tries to connect to it and it seems the dragon just keeps rebooting
[08:26:14] <tlab_> yeesh after 10mins now it's updating
[09:46:57] <Jartza> hmmh
[10:01:10] <Jartza> why on earth I need to set the PWM1B and COM1B1 on GTCCR even if I just want the timer to behave like in master
[10:01:38] <Jartza> TCCR1 has been set to on both master and slave (1 << CTC1) | (1 << CS10) | (1 << CS11)
[10:01:45] <Jartza> (attiny85)
[10:02:34] <Jartza> shouldn't CTC1 bit take care of resetting counter back to 0 when it reaches OCR1C?
[10:02:56] <Jartza> OCR1A has value 130, OCR1B value 139 and OCR1C value 158 in master
[10:03:28] <Jartza> I thought I don't need to set the GTCCR in slaves, as the timer should run at same speed on both, but it seems if I leave them out, the slaves aren't in sync anymore
[10:06:08] <Jartza> http://pastie.org/10356730
[11:03:10] <eballetbo> hi all, just for if I've some kind of luck, any clue on this ? http://www.avrfreaks.net/comment/1638376#comment-1638376 , thanks in advance
[15:04:27] <kobboi> being a rookie AND stupid, i'm trying to flash a led via an N-channel mosfet with its gate connected to PC0. works fine but when i reset the avr, the led is already on for some short time (my program starts with a 2 second sleep to make sure it has nothing to do with my code) which i don't want when i later replace the led with something more interesting. i added a pulldown resistor but 10k and 2.2k don't do anyhting, and 220 is too l
[15:15:41] <RikusW> 10k pulldown should work...
[15:16:05] <kobboi> and if it doesnt what could be going on?
[15:16:21] <kobboi> (let's assume i wired everything up correctly)
[15:16:44] <kobboi> also, i'm working on a breadboard, if that might have any impact
[15:16:45] <RikusW> which avr are you using ?
[15:16:51] <kobboi> atmega328p in dip
[15:17:51] <kobboi> mosfet is IRLB3034
[15:18:43] <RikusW> what happens when you pull reset low ?
[15:18:58] <RikusW> led stays on ?
[15:20:17] <kobboi> i have a power supply thingy plugged into the breadboard and just press its on/off button
[15:20:51] <kobboi> so i now connect reset to gnd?
[15:21:21] <kobboi> reset is currently connected to my avrispv2 compatible programmer
[15:21:36] <kobboi> i will disconnect it and pull reset low
[15:21:40] <RikusW> disconnect from programmer and then to ground
[15:22:47] <kobboi> ok, program does not run (as expected), led is on for the exact same amount of time as before
[15:23:01] <kobboi> like 0.1 seconds or so
[15:23:10] <kobboi> very noticeable, more than a flicker
[15:23:32] <RikusW> and while reset is low ?
[15:23:51] <kobboi> reset is low, connected to ground
[15:23:59] <RikusW> and led ?
[15:24:05] <RikusW> on or off ?
[15:24:32] <kobboi> i know you expect an on/off answer but it is as described above
[15:24:49] <kobboi> but this time the program does not start (no intended flickering after the 2s sleep)
[15:25:31] <RikusW> so as long as reset is low, is the led on or off ?
[15:25:57] <kobboi> again, when reset is connected to ground and power is restored to the breadboard: the led is on for 0.1 seconds and then off indefinitely
[15:26:33] <kobboi> vs when reset is not connected to ground: the led is on for 0.1 seconds, and 1.9 seconds later the flickering by the program starts/loops
[15:27:21] <kobboi> oh wait
[15:27:28] <RikusW> connect power, then pull reset low and release it
[15:27:31] <kobboi> i have made a big error in my reasoning i think
[15:28:22] <kobboi> the gate is not connected to PC0, but to the output of a noretriggerable monostable multivibrator
[15:28:36] <kobboi> to have finite flickers in case my program is fucked up
[15:29:39] <kobboi> so i guess i should look into the power-on behavior of that thing?
[15:30:43] <RikusW> yes
[15:30:50] <kobboi> on your question: the led is on for 0.1, and when i release RESET 30seconds later, the program starts
[15:31:10] <RikusW> why not connect it directly to PC0 ?
[15:31:25] <RikusW> PC0 - resistor - led ?
[15:31:40] <RikusW> IO pins can give 10 - 20mA
[15:31:44] <Jartza> hej
[15:31:46] <kobboi> the led is just a test
[15:31:56] <kobboi> i want to replace it with a solenoid of a cash drawer
[15:32:01] <RikusW> connect the gate to PC0 then
[15:32:13] <kobboi> i have read somewhere that a certain type of drawer can only deal with pulses of 250ms
[15:32:16] <Jartza> writing this blog post is harder than writing the VGA code itself :D
[15:32:21] <kobboi> and i dont want to break the cash drawer
[15:32:31] <RikusW> and preferably a resistor between PC0 and the gate
[15:32:37] <kobboi> so i wanted something that ensures small enough pulses even when i forget to turn off pc0
[15:32:53] <RikusW> and do remember the back emf diode on the solenoid !
[15:32:54] <kobboi> (forget= because my code is fxcked up)
[15:32:56] <kobboi> yes
[15:33:00] <kobboi> i know about the diode
[15:33:05] <kobboi> but im not in that phase yet :)
[15:33:22] <kobboi> because as it is now, the cash drawer just opens when rebooting the avr :)
[15:33:26] <kobboi> (= the led is on)
[15:34:16] <kobboi> is triggering the power to the multivibrator chip via the AVR something that people do?
[15:34:20] <RikusW> PC0 on; delay(250); PC0 off; should work just fine.
[15:34:29] <kobboi> do you normally power stuff after the uC is in a known state?
[15:35:00] <kobboi> i know i know, maybe i'm too worried
[15:35:08] <kobboi> but when dealing with interrupts later on
[15:35:13] <kobboi> i don't want to fxck it up
[15:35:19] <RikusW> first thing to do is usually initialize everthing, then start doing something
[15:35:22] <Jartza> well, avr-gcc adds code to clear ram, set stack address etc. which runs before pin-setup-code
[15:35:23] <kobboi> so i decided to use the additional component
[15:36:18] <RikusW> is 250mS the min or max time for the pulse ?
[15:36:20] <Jartza> so the chip pins are in default state for a while in boot
[15:36:47] <kobboi> max but the drawer i bought has no spec nor manual, i just read it ... somewhere
[15:36:53] <Jartza> whatever the default is, should consult datasheet about that
[15:37:21] <kobboi> the thing needs 24V and the solenoid resistance is 30 ohm
[15:37:30] <kobboi> i can imagine that i can't take too much energy
[15:37:35] <Jartza> if you want some init code before stack address setup and stuff, you need toplay with section names
[15:38:12] <Jartza> and be careful not to use stack or sram nor mess things up
[15:38:46] <Jartza> also there's something called "start-up time" (SUT fuses) which van sometimes be quite long
[15:39:04] <RikusW> *can
[15:39:23] <kobboi> can?
[15:39:27] <Jartza> I usually use the longest, which in case of attiny85 and external osc is 65ms
[15:39:34] <Jartza> can, yes. not van.
[15:39:34] <RikusW> 24V 30R, almost 1A...
[15:39:42] <kobboi> indeed
[15:40:38] <RikusW> why not do the delay in a timer interrupt to turn off PC0 ?
[15:41:07] <RikusW> PC0 on; timer on; irq -> timer off, PC0 off;
[15:41:20] <kobboi> timer interrupt having very high priority?
[15:41:30] <RikusW> same as the others
[15:41:47] <kobboi> oh i thought interrupts had priorities
[15:41:52] <RikusW> in general keep interrupts short
[15:41:57] <RikusW> not on avr
[15:42:18] <RikusW> err, maybe...
[15:42:33] <kobboi> anyway, i hear what you're saying, but on the other hand, i want to learn as well
[15:42:47] <kobboi> i guess i should have kept the multicrap thing in reset
[15:44:35] <kobboi> i was just following the datasheet telling me to connect reset to vdd
[15:44:57] <kobboi> i guess i should connect reset to an avr pin including a pull down?
[15:45:10] <RikusW> can work
[15:45:18] <kobboi> uncommon?
[15:45:47] <RikusW> just make sure whether the chip's reset is active high/low
[15:46:40] <kobboi> will do
[15:46:49] <kobboi> i have some more experimenting to do :)
[15:46:53] <RikusW> the singleshot chip is maybe a bit paranoind ;) but it should work
[15:46:56] <kobboi> thanks for your valued input
[15:47:03] <RikusW> :)
[15:47:10] <kobboi> the thing is, i don't know how the drawer works
[15:47:15] <kobboi> and im afraid to break it
[15:47:21] <kobboi> and having to buy a new one
[15:47:28] <RikusW> hmm
[15:47:51] <kobboi> if i better knew how solenoids/actuators work, maybe i would not be so afraid
[15:48:15] <kobboi> same thing for the flyback diode, for all i know, the thing has one bultin
[15:48:22] <RikusW> the solenoid will probably overheat, and eventually burn out
[15:48:38] <RikusW> but I'd say it will take at least a few seconds or even longer
[15:48:53] <kobboi> what makes the solenoid do its thing? absolute current? or "integrated" current
[15:49:07] <RikusW> 2 parallel flyback diodes won't hurt, none will
[15:49:12] <kobboi> true
[15:49:34] <RikusW> its just an electromagnet
[15:50:05] <RikusW> pulling in a bit of iron when energized
[15:50:47] * RikusW messed around with automotive starter solednoids...
[15:50:53] <kobboi> "energized" = ?
[15:51:01] <RikusW> the back emf of those can be a shocking experience :-D
[15:51:11] <RikusW> turned on
[15:51:17] <kobboi> afaik if i put in a current that is too small, i can wait forever for the thing to open
[15:51:34] <RikusW> yes
[15:51:34] <kobboi> as far as i understand i really need to attain some current value
[15:51:48] <RikusW> you need to know what V to apply
[15:52:10] <RikusW> and have a power supply that can handle the current
[15:52:16] <kobboi> 24, but 15 works as well ( i tried it once, with some sparks when disconnecting :))
[15:52:25] <RikusW> or use a cap
[15:52:44] <kobboi> how do i properly measure the L of the solenoid?
[15:52:44] <RikusW> 12V ?
[15:53:04] <kobboi> or is it of no importance
[15:53:15] <RikusW> You need an LCR meter, its probably not relevant to what you are doing
[15:53:36] <RikusW> only resistance matters
[15:53:40] <kobboi> so if I apply 24V, then after some short time i will have 800mA running which should be enough to open the thingy
[15:53:51] <RikusW> yes
[15:53:53] <kobboi> because 800mA will "magnetize" the thingy enough to open it
[15:53:58] <kobboi> is that a correct reasoning?
[15:54:00] <RikusW> yes
[15:54:17] <kobboi> i only need a time t large enough to reach the current needed
[15:54:23] <kobboi> which is probably very very small
[15:54:28] <kobboi> and a lot less than 250 ms
[15:54:43] <RikusW> how do you know it needs to be 24V ?
[15:54:54] <kobboi> that's the only thing it said on the box
[15:54:58] <kobboi> 24v epson
[15:55:06] <kobboi> made to connect to epson ticket printers
[15:55:11] <RikusW> is it printed on the current solenoid ?
[15:55:27] <RikusW> ah
[15:55:30] <kobboi> the internals of the drawer are unknown, closed metal box
[15:55:47] <kobboi> there is an RJ12 connector (6 wires) coming out of it
[15:55:55] <kobboi> 2 of the wires are for the 24V (tested)
[15:56:05] <kobboi> 2 others are for determining the open/closed state
[15:56:08] <kobboi> (tested)
[15:56:24] <kobboi> 2 others are unused
[15:56:41] <kobboi> (or for a second solenoid, but does not apply to my situation)
[15:56:52] <RikusW> if 12V does work I'd use that instead
[15:57:24] <kobboi> yeah that needs some testing
[15:57:34] <kobboi> to make sure it works "almost always"
[16:49:17] <anasver> Hi there, any tips on what might be wrong when mega88 causes errors with avrdude when programming with 3.3V but working in the very same setup with 5V?
[16:53:29] <Casper> your programmer could be 3.3V intolerant
[16:54:20] <anasver> It explicitly has a jumper to switch between 3.3V and 5V. Also I'm using the programmer as supply. On the scope the voltage looks clean.
[16:55:13] <Casper> external crystal?
[16:55:28] <anasver> Crystal is 2.5MHz so within specs.
[16:56:01] <Casper> try maybe to lower slightly the programmer speed... maybe it's slightly on the edge of working due to timing/rise/fall time....
[16:56:38] <RikusW> that is a possible solution
[16:57:13] <anasver> I wen't through the avrdude manfile but saw nothing that looked like it would change the speed. Do I need a special programmer for that?
[16:57:23] <anasver> (I'm using a "diamex allavr"
[16:58:00] <RikusW> parallel port ?
[16:58:17] <anasver> not available :(
[16:58:29] <RikusW> is it usb based ?
[16:58:55] <anasver> yes
[16:59:07] <Jartza> "threetiny85-vga" has been running stable >20h
[16:59:19] <Jartza> and still in sync. very nice
[16:59:49] <Casper> bbl
[17:00:58] <anasver> ?
[17:01:09] <anasver> what bugs me is that it is all working fine with 5V
[17:01:53] <RikusW> at least it works
[17:02:14] <Jartza> anasver: many cheap programmers just supply 3.3V but use 5V for programming logic
[17:02:37] <anasver> hang on, i'll check that
[17:02:42] <Jartza> that's why I made my own level shifter with selectable LDO
[17:03:09] <Jartza> my programmer also had 3.3V/5V selector, but only 5V worked
[17:04:32] <Jartza> https://www.dropbox.com/s/z8luumodqkm4mm0/IMG_20150122_175213~2.jpg?dl=0
[17:04:40] <Jartza> that's why I made that
[17:05:08] <anasver> I see.
[17:05:19] <Jartza> it acts as 10-to-6 pin isp converted, isp-to-breadboard helper, level shifter and LDO
[17:06:30] <anasver> Weird thing is: When I attach the SPI lines to the scope two of them are at 3.2V and one is at 2.2V
[17:07:16] <Jartza> yep
[17:07:17] <anasver> An while programming all of them are between 2.2 and 3.2
[17:07:40] <anasver> so I guess it doesn't go down enough to be counted as zero
[17:08:12] <Jartza> sounds like the reason why I made my own levelshifter board
[17:08:20] <anasver> that matches the fact that the bytes that avrdude receives wrong (ID-Bytes) are read as FF
[17:08:30] <Jartza> which of course could be used for multiple purposes
[17:08:54] <Jartza> converting buses from down to 1.8V up to 12V-ish
[17:09:07] <anasver> Well your right, this would also fix my problem.
[17:09:14] <anasver> *you're
[17:09:47] <anasver> Just didn't think about that since the programmer made me believe it could do 3.3V
[17:09:51] <anasver> Cheap crap.
[17:10:23] <anasver> Anyways thanks for the help!
[17:10:26] <Jartza> yeah :)
[17:10:30] <Jartza> no prob
[17:10:45] <Jartza> I needed level shifter anyway
[17:11:17] <Jartza> now I have better programmer too, but still use the shifter
[17:58:45] <masoudd> Hi. I read somewhere that it's better not to leave the input pins floating. Does this have any merit?
[18:07:19] <twnqx> power consumption
[18:07:27] <twnqx> up the point of device destruction.
[18:07:56] <twnqx> you can of course just activate the internal pullups
[18:08:09] <masoudd> twnqx:I understand
[18:08:56] <masoudd> twnqx:but if that is so, why are all ports input with no pull up upon powerup? Or am I mistaken about this?
[18:09:28] <twnqx> because anything else would cause problems
[18:09:37] <twnqx> pullups are visible to the outside, too
[18:09:56] <twnqx> it's not like you pull the inside of the chip up and the outside doesn't get pulled
[18:10:36] <masoudd> twnqx:So first thing I should do upon powerup, is to turn on all pullups on the unused pins?
[18:12:07] <twnqx> that would help, yes
[18:12:07] <Lambda_Aurigae> or set them to outputs.
[18:12:28] <twnqx> or that
[18:12:34] <twnqx> output also has less internal power draw
[18:12:50] <masoudd> Let's imagine I'm experimenting with an attiny 2313 and I have only one led connected to one pin, to blink it. The best practice would be to configure the rest of the pins as output or enable their pullups?
[18:13:07] <Lambda_Aurigae> output.
[18:13:10] <Lambda_Aurigae> no pullups.
[18:13:14] <Lambda_Aurigae> set to 0.
[18:14:02] <masoudd> Lambda_Aurigae, twnqx: OK that makes sense. Thank you.
[19:23:40] <hetii> Hmm wonder why buspirate cost 30$ ...
[19:25:23] <Lambda_Aurigae> because people will pay that for it.
[19:27:00] <hetii> True, I plan to use LPC11C24 and build my own version with a CAN support
[19:27:23] <Lambda_Aurigae> I built my own with a pic32.
[19:27:53] <hetii> Any additional benefits in your pic model?
[19:27:57] <Lambda_Aurigae> faster.
[19:28:08] <Lambda_Aurigae> one chip and a couple of resistors.
[19:28:12] <Lambda_Aurigae> no crystal needed.
[19:28:49] <hetii> suppose have usb build inside ??
[19:28:52] <Lambda_Aurigae> yup.
[19:28:57] <Lambda_Aurigae> hardware usb, 64K sram.
[19:29:02] <hetii> nice
[19:29:03] <Lambda_Aurigae> so I have a pretty good size buffer.
[19:29:19] <Lambda_Aurigae> pic32mx270f256b.
[19:29:30] <Lambda_Aurigae> 50MHz
[19:31:09] <hetii> how you expose it to user space? as serial port or bulk device ?
[19:31:35] <Lambda_Aurigae> serial port.
[19:31:46] <Lambda_Aurigae> working on doing a dual serial port actually.
[19:31:57] <Lambda_Aurigae> can easily do multiple endpoints after all.
[19:32:12] <hetii> yep, 2 serial is minimum "must have" in my case :)
[19:32:54] <Lambda_Aurigae> one for command and one for data throughput.
[19:33:17] <Lambda_Aurigae> it's part of my multi-project pile here.
[19:34:28] <Lambda_Aurigae> just ordered some pic32mz chips to try to build a new toy.
[19:34:42] <hetii> hmm, well in fact at the beggining I think to use one serial endpoint and write simple linux driver that will talk over it and send additional header packet that will be used for configuration and for routing(to know where to send some package)
[19:35:19] <hetii> and after that this driver will expose additional devices on ( if kernel have subsystem for it)
[19:35:22] <hetii> like i2c
[19:36:14] <Lambda_Aurigae> haven't done any kernel driver work in years.
[19:36:51] <hetii> its just an idea :)
[19:37:07] <Lambda_Aurigae> not a bad one.
[19:38:02] <hetii> thx, will share link when done, will be open-source :)
[19:38:50] <hetii> also I plan to add in this board space for esp8266 so then we can talk to it via wifi
[19:39:34] <hetii> sometimes can be handy to avoid using long wires.
[19:45:19] <Yoduza> 640KB SPI memory for AVR ?
[19:45:59] <Lambda_Aurigae> what about it?
[19:46:21] <Lambda_Aurigae> I don't know any attiny or atmega with 640K sram....or flash for that matter.
[19:46:47] <Yoduza> I2C ?
[19:46:58] <Lambda_Aurigae> what about it?
[19:47:11] <Lambda_Aurigae> AVR has i2c but they call it TWI.
[19:47:17] <Yoduza> It's need for salsa20/8+chacha
[19:47:33] <Lambda_Aurigae> salsa is to eat and chacha is a dance.
[19:47:46] <Yoduza> sha-2 ?
[19:48:03] <Lambda_Aurigae> I suggest an ARM rather than AVR.
[19:49:53] <Yoduza> datasheets on DMA for DDR3 ?
[19:50:11] <Lambda_Aurigae> what about them?
[19:50:16] <Lambda_Aurigae> you might try full sentences.
[19:51:27] <Yoduza> Task: AVR+memory+USB = scrypt miner. https://github.com/ghostlander/cpuminer-neoscrypt/blob/master/cpu-miner.c
[19:51:44] <Lambda_Aurigae> not my task.
[19:51:58] <Yoduza> 640 KB memory need
[19:52:15] <Lambda_Aurigae> then add external memory...but you won't be able to directly map it.
[19:52:39] <Lambda_Aurigae> even those AVR chips that have external memory interfaces can only access 64K of sram at a time.
[19:52:40] <Yoduza> directly map ?
[19:53:01] <Yoduza> 64K only ?
[19:53:15] <Lambda_Aurigae> I suggest reading the datasheet for a few AVRs and learn their capabilities.
[19:53:29] <Lambda_Aurigae> you can access more but you have to do it bank switching.
[19:53:52] <Lambda_Aurigae> only a few chips have external memory interface though.
[19:54:25] <Lambda_Aurigae> if you want to bitbang access then you can access as much as necessary, whatever you want, it's just a matter of how many i/o pins you want to use.
[19:54:34] <Lambda_Aurigae> unless you use i2c or spi interfaced sram.
[19:55:04] <Lambda_Aurigae> microchip makes a 1Mbit spi interfaced serial sram.
[19:55:28] <ali1234> hashing is going to be slow already
[19:55:41] <ali1234> bitbanging the ram is going to make it an order of magnitude slower
[19:55:45] <Lambda_Aurigae> then go with an ARM processor with 1GB of sram.
[19:56:03] <Lambda_Aurigae> or a pic32.
[19:56:34] <ali1234> right, you're going to want 32 bits
[19:56:40] <Lambda_Aurigae> yup.
[19:56:54] <Lambda_Aurigae> doing sha2 on 8bits is gonna be dog-snot slow anyhow.
[19:57:03] <Yoduza> 19 bits need
[19:57:22] <Lambda_Aurigae> Yoduza, it can be done on an 8bit processor...
[19:57:28] <Lambda_Aurigae> the math will just be very very slow.
[19:57:40] <ali1234> anything can be done on any processor, that's like the definition of a processor
[19:57:54] <Lambda_Aurigae> hehe..yeah, kindasorta.
[19:57:55] <ali1234> unfortunately the definition also includes the clause "infinite time"
[19:58:00] <Lambda_Aurigae> I built a 4bit processor years ago.
[19:58:20] <Lambda_Aurigae> didn't have enough ram to do that kinda thing though.
[19:58:26] <Lambda_Aurigae> only 256 bytes.
[19:58:35] <Yoduza> Celeron 1.7Gh ~= 1300 hashes per sec. AVR ?
[19:58:58] <ali1234> less than 1
[19:59:00] <Lambda_Aurigae> a lot slower.
[19:59:10] <Lambda_Aurigae> avr runs at a maximum of 20MHz...20MIPS
[19:59:27] <Yoduza> 20MHz AVR ~= 1 hash a sec ?!!
[19:59:33] <Lambda_Aurigae> or less.
[19:59:49] <ali1234> probably a lot less
[20:01:00] <Yoduza> Celeron 1.7GHz = 100MHz * 17. +100 ticks for memory access. AVR using sram 20MHz clocking. 1 hash a sec ?
[20:01:15] <Lambda_Aurigae> Yoduza, who knows?
[20:01:17] <ali1234> SPI SRAM
[20:01:23] <Lambda_Aurigae> you would have to build it and see.
[20:01:36] <Lambda_Aurigae> it is probably going to be more like 2 or 3 hashes per minute.
[20:01:39] <ali1234> it's going to take at least 10 cycles to read a byte
[20:01:47] <Lambda_Aurigae> because that software likely requires floating point math.
[20:02:23] <ali1234> i don't think salsa uses FP
[20:02:48] <Lambda_Aurigae> yeah...looking now.
[20:02:50] <Lambda_Aurigae> no floating point.
[20:02:54] <Lambda_Aurigae> but it's not 8bit math either.
[20:03:00] <ali1234> i don;t think any hashfunc uses floating point
[20:03:10] <Yoduza> ~3% flot point using in miners software, other 97% is a +-*xor or and ror rol
[20:03:12] <Lambda_Aurigae> 32bit unsigned int.
[20:03:36] <Lambda_Aurigae> so the math is going to be real slow.
[20:03:42] <ali1234> are you trying to mine cryptocurrency on an AVR?
[20:04:41] <Yoduza> it is a task
[20:06:39] <Yoduza> I think it would be 100 hashes per 1 AVR
[20:07:03] <ali1234> well, all i can say is do it and prove us wrong
[20:08:28] <Yoduza> do it on AVR or PIC32 ?
[20:10:07] <Yoduza> xilinx can do it :)
[20:10:45] <Yoduza> 470 MHash / sec. per 1 Xilinx Spartan 6LX150
[20:11:14] <Yoduza> ~ $100 a day profit
[20:12:00] <Yoduza> 5A use only :)
[20:13:26] <Lambda_Aurigae> and?
[20:13:35] <Lambda_Aurigae> an avr is an 8bit low end microcontroller.
[20:13:50] <Lambda_Aurigae> it's not in the same class.
[20:14:01] <Lambda_Aurigae> it's more equivalent to a 20MHz 80286.
[20:15:13] <Yoduza> ~$20 per 1 chip Xilinx Spartan 6LX150
[20:15:31] <Lambda_Aurigae> so?
[20:15:34] <Lambda_Aurigae> what is your point?
[20:15:47] <Lambda_Aurigae> an fpga and an avr are not the same thing...not in the same class.
[20:16:16] <Lambda_Aurigae> that spartan can probably run the free-avr core much faster than a real avr...possibly hundreds of times faster.
[20:17:38] <Yoduza> but spartan dont have manuals in the internets, simulators, debagers etc. AVR examples very many in the internet.
[20:17:51] <Lambda_Aurigae> so?
[20:18:06] <Lambda_Aurigae> the AVR is likely not going to do what you want nearly as fast...nor as easily as you seem to think.
[20:21:03] <Yoduza> I just want to make miner. If you told about <1 hash a second per 1 AVR. Well. Ok.
[20:21:13] <Lambda_Aurigae> so make it.
[20:21:46] <ali1234> i wish there was decent free FPGA software and documentation
[20:21:56] <ali1234> but there isn't
[20:22:06] <Lambda_Aurigae> I still need to learn vhdl
[20:22:20] <Lambda_Aurigae> one of these days I'll get a board with an fpga on it.
[20:22:34] <Yoduza> Better ro buy devboard with Spartan 6 LX9 for $10, download ISE and make a normal miner.
[20:22:39] <Yoduza> *to
[20:24:22] <Yoduza> ali1234 free FPGA software and documentation in complete with devboard :)
[20:24:46] <Yoduza> there is many examples on dvd :)
[20:25:08] <Yoduza> simulator also there :) programmer/debugger also there :)
[20:25:33] <Yoduza> only for $20. This price of 2 AVR chips :)))
[20:26:38] <Yoduza> I know the name of devboard with Spartan. It's about $20 question :P
[20:28:28] <Yoduza> BTC 122yBy8nzawqDYZvF9QGpkTbcqqTAHyV1M . For question success :)
[20:29:09] <Lambda_Aurigae> what the heck is that?
[20:29:46] <ali1234> a bitcoin address
[20:29:51] <Lambda_Aurigae> ok.
[20:29:55] <Lambda_Aurigae> still meaningless.
[20:30:05] <Lambda_Aurigae> I know bitcoin is some kind of cryptocurrency thing.
[20:30:13] <Lambda_Aurigae> but beyond that, it's useless far as I can see.
[20:31:19] <ali1234> i would explain it but i get the feeling you've already decided
[20:31:50] <Lambda_Aurigae> I know it's somehow worth money to people.
[20:31:55] <Lambda_Aurigae> and it's being used for transactions.
[20:32:02] <Lambda_Aurigae> just never saw a need or use for it.
[20:32:42] <Lambda_Aurigae> so, he posted a bitcoin address...what use is it?
[20:33:20] <ali1234> he wants $20 to tell me about this amazing FPGA development board that i probably already know about
[20:33:51] <Lambda_Aurigae> oh geeze.
[20:34:11] <Lambda_Aurigae> that's as bad as me charging 5 dollars via paypal to do google searches for people.
[20:34:18] <Lambda_Aurigae> I got paid once about 12 years ago.
[20:34:25] <ali1234> lol
[20:35:08] <Lambda_Aurigae> I think it was in this channel too.
[20:35:25] <ali1234> so anyway bitcoin in a nutshell: you know how you can cryptographically sign things to prove you wrote them? imagine if you did that with IoUs and sent them over the internet
[20:35:49] <ali1234> if you think about that you'll notice two problems with doing that, bitcoin solves both of them
[20:36:01] <Lambda_Aurigae> then people run these mining programs that steal them or something like that?
[20:36:19] <ali1234> no
[20:37:07] <ali1234> the two problems are 1. what if someone just writes a load of IoUs from nowhere? and 2. what if someone sends the same IoU to two different people?
[20:37:41] <ali1234> mining solves the second problem by using a merkel tree in order to ensure that each IoU can only be spent once
[20:38:01] <ali1234> the merkel tree is made by the P2P network of miners, who are paid for doing that with bitcoin, which solves problem 1.
[20:41:59] <Yoduza> *simulator also there :) compiler/programmer/debugger also there :)
[20:42:32] <Yoduza> shipping from Ukraine
[20:42:38] <Lambda_Aurigae> does it run on linux?
[20:43:00] <Yoduza> yes linux too
[20:43:24] <Lambda_Aurigae> but you want us to pay you to tell us what it is.
[20:43:39] <Lambda_Aurigae> sounds kind of silly to me.
[20:43:42] <Lambda_Aurigae> or a scam.
[20:44:04] <Yoduza> $20 for a link to website. Devboard cost $20
[20:44:12] <Lambda_Aurigae> sounds like a scam.
[20:45:00] <Lambda_Aurigae> like going to the store and the salesman telling me I have to pay him to get in the store in the first place.
[20:45:29] <Yoduza> not a scam. Your $20 I would spent for make a NEOSCRYPT miner for that devboard.
[20:45:33] <Lambda_Aurigae> I suggest you peddle it in The Ukraine.
[20:46:22] <ali1234> either altera or xilinx has linux software now
[20:46:29] <ali1234> i forget which, maybe both
[20:46:31] <Lambda_Aurigae> ali1234, yeah. I've tried both.
[20:46:37] <ali1234> neither is easy to use
[20:46:41] <Lambda_Aurigae> still need to learn vhdl.
[20:46:56] <Lambda_Aurigae> which is a matter of me just sitting down and playing with it.
[20:47:03] <Yoduza> on that website you can ask support about other Europe/USA countries for shipping.
[20:47:06] <Lambda_Aurigae> but have to talk the wifey into the money to buy a board.
[20:47:29] <ali1234> at university i used some FPGA software which you programmed by drag and drop the logic gates
[20:47:30] <Lambda_Aurigae> Yoduza, I can get boards for the same price with software without paying you.
[20:47:44] <Lambda_Aurigae> straight from the fpga manufacturer even.
[20:47:44] <ali1234> you could make parts libraries, it had all 74 logic already to go
[20:47:54] <ali1234> it was really easy
[20:48:00] <Lambda_Aurigae> ali1234, and how much was said software?
[20:48:00] <Lambda_Aurigae> hehe
[20:48:06] <Yoduza> Lambda_Aurigae, yes you can. But you cant make a miner :P
[20:48:16] <Lambda_Aurigae> Yoduza, I don't want to...I have no use for one.
[20:48:21] <ali1234> Lambda_Aurigae: no idea, i don't even remember what it was called. it ran on sparcstations only
[20:48:29] <Lambda_Aurigae> if I put my mind to it, I likely could, however.
[20:48:50] <ali1234> it may even have been written by the university
[20:48:58] <Lambda_Aurigae> ali1234, very possible.
[20:49:10] <Yoduza> Lambda_Aurigae it take few years to mind that. I spent 1 year already. :P
[20:49:22] <ali1234> it even had a simulator built in
[20:49:35] <ali1234> i've been looking for something like that ever since
[20:50:05] <Lambda_Aurigae> Yoduza, so? I could likely learn VHDL in a year on my own well enough to build my own custom processor or vga adapter or just about anything else I want.
[20:50:17] <Lambda_Aurigae> I just don't have the need or want to do so yet.
[20:50:25] <ali1234> you can't mine anything worth anything with FPGAs at this point anyway
[20:50:31] <Lambda_Aurigae> I'm still learning avr, pic, pic32, 8052, and arm.
[20:50:56] <Lambda_Aurigae> along with lua
[20:50:57] <Yoduza> Lambda_Aurigae you mean VHDL + c-code of existing miner https://github.com/ghostlander/cpuminer-neoscrypt/blob/master/cpu-miner.c :P
[20:51:41] <Lambda_Aurigae> the only one that's causing my head to spin at all is lua...but I only started with that 3 days ago and have about 2 hours total into it.
[20:51:51] <Lambda_Aurigae> and about 800 or so lines of code.
[20:52:34] <ali1234> lua is horrible
[20:52:38] <Lambda_Aurigae> it is.
[20:52:44] <Lambda_Aurigae> worse than ADA in the late 80s.
[20:53:07] <Lambda_Aurigae> written for people who don't want to think but can't help but overthink things.
[20:53:20] <ali1234> the syntax is just ugly
[20:53:27] <Lambda_Aurigae> I mean, come on, a variable can hold any data? the back end management for that must be horrid.
[20:53:59] <Lambda_Aurigae> thought I might port it to a microcontroller but the more I learn about it the more I find it distasteful.
[20:54:36] <Lambda_Aurigae> but I need to learn it for a project I agreed to take on which will pay me between 5000 and 8000 USD over the next 6 months.
[20:54:54] <Yoduza> am use asm only for microcontroller :P
[20:55:11] <Lambda_Aurigae> Yoduza, that's nice....I use asm and C, depending on the project.
[20:55:26] <Lambda_Aurigae> usually C with assembly subroutines for timing critical stuff.
[20:58:29] <Lambda_Aurigae> just finished a little x86 C and assembly project to build a custom "OS" for a PC to drive a piece of equipment. We reverse engineered the communications protocol and interface hardware and wrote our own system for it...was easier than trying to make linux, dos, or winblows drivers.
[20:59:30] <Yoduza> that website located in Kiev/Ukraine. They make import from Latvia. About 10 000 boards and components on their website in Kiev.
[21:00:25] <Yoduza> ok. $20 for FREE :D
[21:00:26] <Yoduza> www.baltelektron.com.ua
[21:00:43] <Yoduza> !tip all all :D
[21:01:30] <Lambda_Aurigae> aaaand, need google translator for it.
[21:01:37] <Yoduza> http://www.baltelektron.com.ua/search.html?q=spartan
[21:01:47] <Lambda_Aurigae> first thing I see on there is the rPI B+ which I have already.
[21:03:30] <Yoduza> https://translate.google.com/translate?sl=ru&tl=en&js=y&prev=_t&hl=ru&ie=UTF-8&u=http%3A%2F%2Fwww.baltelektron.com.ua%2Fsearch.html%3Fq%3Dspartan&edit-text=
[21:03:57] <Lambda_Aurigae> http://www.xilinx.com/products/boards-and-kits/hw-spar3an-sk-uni-g.html
[21:03:59] <Lambda_Aurigae> same kit
[21:04:03] <Lambda_Aurigae> straight from spartan.
[21:04:13] <Yoduza> yah
[21:04:15] <Lambda_Aurigae> err..from xilinx.
[21:04:25] <Yoduza> :)
[21:04:31] <Lambda_Aurigae> so why would I buy it from ukrane when the manufacturer is really here?
[21:05:18] <Yoduza> there is many items, but only one cost $20 :P
[21:05:50] <Lambda_Aurigae> and the same thing is available elsewhere.
[21:06:02] <Lambda_Aurigae> I don't see anything unique on that site.
[21:06:05] <Lambda_Aurigae> it's just a reseller.
[21:07:03] <Yoduza> At my last job (www.qdpro.com.ua eg. www.wto.org) my chief brother work in top management in Xilinx :P
[21:07:44] <Lambda_Aurigae> I'm a lead analyst for Xerox.
[21:08:02] <Lambda_Aurigae> somewhat slightly bigger company.
[21:08:27] <Lambda_Aurigae> hope to be in management in about 3 years or so.
[21:08:48] <Lambda_Aurigae> anyhoo, time for me to head to bed.
[21:08:51] <Lambda_Aurigae> nighters all.
[21:09:01] <Yoduza> nice position :)
[21:12:18] <Yoduza> I am programmer only. Even without degree :D
[21:18:36] <Yoduza> rpi2+ expensive. Better to buy xilinx devboard :D
[21:29:33] <rue_school> are you using it to flash an led?
[21:33:38] <Casper> anyone here familiar with mercury merc6 1968 outboard motor? mainly the tilt mechanism? ideally that can provide a schematics? there is a missing link between the release handle and the release mechanism...
[21:39:47] <Tom_itx> https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8
[21:40:01] <Tom_itx> gotta love that
[21:40:13] <Casper> invalid url
[21:40:37] <Tom_itx> pm
[21:40:38] <Tom_itx> it
[21:40:45] <Tom_itx> 's a pdf of the manual
[21:41:03] <Yoduza> rue_school for Neoscrypt
[21:42:27] <Casper> hmmm look promising
[21:56:47] <Casper> Tom_itx: thanks for the pdf, it answer some question I had, but not the one I have right now...
[21:56:57] <Casper> but it's golden, enought to possibly print
[21:58:16] <Tom_itx> meh, save a tree
[21:59:27] <Casper> the logical way to put the rod would be "straight"... but then it would hit the boat...
[21:59:40] <Casper> when it clear the boat... it's on the wrong side of the pin...
[22:01:07] <Tom_itx> maybe you have a left and need a right
[22:01:43] <Casper> https://www.flickr.com/photos/93694432@N04/20477377249/in/album-72157656990828758/
[22:01:57] <Casper> https://www.flickr.com/photos/93694432@N04/20043170893/in/album-72157656990828758/
[22:02:06] <Casper> https://www.flickr.com/photos/93694432@N04/20654901022/in/album-72157656990828758/
[22:02:23] <Casper> the first pic is an overall view
[22:02:49] <Casper> on the left there is 3 bars
[22:03:14] <Casper> first is a link to hold both side together, ignore it
[22:04:04] <Casper> second is where the hook will go, and also serve as a stop... hmmm there is an hidden one... grrr... and important one...
[22:04:18] <Casper> third is the pivot point of the hook
[22:04:51] <rue_school> hu?
[22:05:05] <Tom_itx> yeah he lost me too
[22:05:08] <Casper> the linkage should go from the lever... to the hidden bar I think... but then it hit the boat..
[22:05:20] <Casper> hmmm
[22:05:33] <Tom_itx> drill a hole in the boat
[22:05:45] <Tom_itx> just not in the bottom
[22:05:53] <Casper> hehe
[22:06:08] <Casper> ow well, I think it will stay like it for a while
[22:17:46] <TechIsCool> Anyone using the NRF24L01+?
[23:08:34] <fobboyandy> hey guys. so I set the fuse bits on my attiny85 to use an external crystal oscillator
[23:08:45] <fobboyandy> and right after that i cant seem to reprogram it
[23:09:11] <fobboyandy> avrdude says initialization failed rc=-1
[23:09:43] <fobboyandy> so i thought hey maybe i need to use a crystal to oscillate the microcontroller since i set the fuse bit to not use its own oscillator
[23:10:27] <fobboyandy> but after attaching the crystal to oscillate it, it still doesnt seem to program. is the microcontroller dead?
[23:12:32] <Casper> fobboyandy: and it's 2 capacitors?
[23:12:53] <Casper> and power cycled?
[23:14:09] <fobboyandy> yeah i used two capacitors
[23:14:48] <fobboyandy> i didnt have the crystal + capacitor attached when i was setting the fuse bits however
[23:21:38] <Casper> what cap value?
[23:21:56] <Casper> and what crystal speed? and you selected external clock or external crystal?
[23:23:35] <fobboyandy> crystal speed 12MHz, chose external crystal on the calculator, used 22pf capacitor value because the attiny85 datasheet said 8mhz+ use 12-22pf
[23:25:53] <fobboyandy> -U lfuse:w:0x7f:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
[23:26:10] <fobboyandy> that was the command used to set the fuses
[23:36:06] <fobboyandy> Casper: i have more attinys. i want to try set the fuses again to make sure i learn how to do it correctly. can you walk me through it?
[23:40:53] <Casper> let me check something
[23:41:35] <Casper> also, try to reverse the crystal, unlikelly, but I came across some crystal at school that was polarised
[23:42:28] <Casper> was funny to find out... half the class had a working project, half did not (like mine), I said: why not... reversed and bam! All the others got the same results...
[23:42:42] <fobboyandy> lol i tried that just now
[23:43:03] <fobboyandy> seems like thats not the case here
[23:43:27] <Casper> ok, try to slow down the programmer
[23:43:39] <Casper> you enabled the clock div8 fuse
[23:43:46] <fobboyandy> yeah i did
[23:44:14] <fobboyandy> i m using a usbtiny
[23:44:18] <fobboyandy> can you slow those down?
[23:44:24] <Casper> not sure
[23:45:00] <fobboyandy> its ok. we can just try to burn the few on a new one
[23:45:41] <fobboyandy> i ll try to do everything i did with the dead uC. but before i do it i ll say what im about to do. then you confirm it before i do it
[23:45:54] <fobboyandy> then we'll see what i did wrong
[23:46:14] <fobboyandy> few = fuse*
[23:46:29] <Casper> don't use the clock divide by 8 unless you need it
[23:46:47] <Casper> your 12MHz is now 12/8=whatever...
[23:46:59] <fobboyandy> LOL
[23:47:05] <fobboyandy> is that the likely reason?
[23:47:38] <fobboyandy> the calculator has so many options on it. i thought most of them were chosen as defaults so all i had to change was the clock source
[23:50:53] <fobboyandy> can i program another uC to go up and down at the rate of 12/8MHz applied at the crystal pins
[23:51:18] <Casper> just slow down the programmer if you can
[23:51:41] <Casper> using another avr will most likelly not work...
[23:53:38] <fobboyandy> let me look up how to slow this one down