#avr | Logs for 2014-06-28

Back
[00:36:38] <gjm> install avrdude
[12:03:49] <Lambda_Aurigae> http://www.smbc-comics.com/index.php?db=comics&id=3404&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+smbc-comics%2FPvLb+%28Saturday+Morning+Breakfast+Cereal+%28updated+daily%29%29
[14:06:02] <Lambda_Aurigae> ok...total non-avr question. VHDL or Verilog to start with FPGA development? For someone who has never touched either one.
[14:10:23] <onr> you pick FPGA first
[14:11:57] <Lambda_Aurigae> was afraid someone would say that.
[14:12:18] <Lambda_Aurigae> for development on linux, who is the better manufacturer to work with?
[14:12:45] <onr> the cheaper one
[14:13:33] <onr> xilinx tools are huuuge
[14:13:43] <Lambda_Aurigae> size isn't an issue.
[14:14:04] <Lambda_Aurigae> I have a spare 1TB drive I'm about to put in this box.
[14:14:36] <onr> size is an issue
[14:14:51] <onr> anyway, there is #fpga
[14:14:56] <onr> or ##fpga
[14:15:02] <Lambda_Aurigae> yeah...that's my next stop.
[15:23:49] <malinus> Lambda_Aurigae, did you find any fpga channels?
[15:28:45] <onr> you all suddenly interested in fpgas now?
[15:34:25] <Jartza> I'm not. yet.
[15:36:56] <onr> i'd be interested in smaller, cheaper FPGAs
[15:37:07] <onr> unlike those FPGAs with gazillion transistor
[15:37:33] <onr> make it $1 and give me 100 transistors
[15:39:10] <Jartza> I'm interested in learning some more basics of electronics :9
[15:39:29] <Jartza> like today I figured what was causing my problems with my LCD
[15:39:39] <Jartza> sometimes it just went haywire and started to print out garbage
[15:40:18] <Jartza> and I was in a firm belief that I only ever needed pull-ups/downs on attiny if I use pins as inputs
[15:41:07] <Jartza> but oscoping the connection I learned that there was some misbehaviour in the lines, which was fixed by adding external pull-ups
[15:45:37] <malinus> Jartza, what kind of LCD do you have?
[15:46:30] <Lambda_Aurigae> I found one..downloading the lattice software now.
[15:46:41] <Lambda_Aurigae> found an fpga board for 26 dollars too.
[15:49:19] <Jartza> malinus: http://www.buydisplay.com/default/display-serial-16x2-cog-lcd-module-pin-connection-white-on-blue
[15:49:24] <Jartza> cheap'n'crappy chinese :)
[15:49:57] <Jartza> they even have schematics ready for SPI
[15:49:57] <Jartza> http://www.buydisplay.com/download/interfacing/ERC1602-4_Interfacing.pdf
[15:50:11] <Jartza> although they don't mention the pull-ups
[15:50:41] <Jartza> but it seems that adding those 10k resistors stabilized the thing and now it doesn't go bonkers anymre
[15:51:20] <Jartza> oh and I haven't connected the reset or csb to attiny
[15:51:44] <Jartza> csb is pulled low, reset is pulled high all the time
[15:52:28] <Jartza> btw. saleae is nice, but I haven't found yet that it would excel the scanaplus that much, except more channels
[15:54:32] <Jartza> but of course, the aluminium box is nicer and design is nicer :)
[15:58:08] <Jartza> but anywho, saleae logic 16 allows me to debug the mystical 16 wire parallel that I'm working with
[16:00:17] <malinus> Jartza, those 16x2 are pretty streight forward. want to see my example avr-code to drive one (using some other library with small changes).
[16:05:03] <Lambda_Aurigae> I like peter fleury's lib...it works well.
[16:06:12] <Jartza> I already made my own lib :)
[16:06:31] <Jartza> I actually made it and then started to look that there's like 50 or so different libraries already available
[16:06:47] <Jartza> but sure, I can look at one more
[16:08:00] <malinus> nah don't bother
[16:08:14] <malinus> Jartza, I just figured you had some problems, but it sounds like it's the wirering
[16:08:53] <Jartza> yes
[16:09:16] <Jartza> works perfectly when I added the pull-ups (actually -downs)
[16:10:26] <Jartza> I might need to optimize it a bit though, it's around 1000 bytes compiled
[16:14:45] <Jartza> although it does include some effects other than just direct printing to lcd
[16:16:44] <Jartza> malinus: https://www.dropbox.com/s/gp2gvhphpzkiw24/VID_20140407_201750.mp4
[16:17:41] <Jartza> malinus: and also https://www.youtube.com/watch?v=7rMJPgWqLus :D
[16:20:29] <Jartza> although those 2 videos are made with smaller lcd, which didn't need pull-ups
[16:20:39] <Jartza> same lib though
[16:24:15] <Jartza> 90% of the time my problems are hw-related :P
[16:26:55] <malinus> Jartza, nice rocket animation
[16:27:20] <Jartza> yeah, made that as a nametag to our company's party :)
[16:27:42] <Jartza> (our company is called Rakettitiede Oy, which is Finnish, but translates directly as "Rocket Science Ltd")
[16:28:10] <Jartza> my title is Chief Senior Rocket Scientist
[16:52:28] <Ox4C4A> I want to put a sine look up table in the memory of an ATtiny9. It's quite straightforward in C, but how do I do it in ASM?
[16:52:46] <Lambda_Aurigae> same way.
[16:53:01] <Lambda_Aurigae> you define a data structure and fill it up.
[16:53:36] <Lambda_Aurigae> .ORG 0x0020 ;start table from 0020
[16:53:36] <Lambda_Aurigae> .dw 7,8,9,10,11,12........
[16:53:42] <malinus> Ox4C4A, also, you might want to consider putting it in the progmem instead of ram
[16:53:51] <Ox4C4A> Obviously progmem
[16:53:59] <Ox4C4A> I don't have enough RAM :D
[16:54:00] <malinus> okay
[16:54:34] <Lambda_Aurigae> google search for avr assembly lookup table.
[16:54:35] <Ox4C4A> Does .dw stand for direct write or something?
[16:54:37] <Lambda_Aurigae> there are dozens of hits.
[16:54:43] <Lambda_Aurigae> more like data word
[16:54:46] <Lambda_Aurigae> or something like that.
[16:55:17] <Lambda_Aurigae> define word
[16:56:06] <Ox4C4A> what if I don't know where exactly I want to put it in the memory?
[16:56:34] <Ox4C4A> Can I write it after all my .CSEG stuff?
[17:00:04] <Ox4C4A> I mean if I don't use .ORG to specifically denote a point in the memory to put it
[17:00:10] <Ox4C4A> how would I locate it?
[17:00:24] <Ox4C4A> How do I get to know the pointer of the original entry?
[17:02:50] <Ox4C4A> It's not like I didn't look anything up before starting to ask about this here, I'm just unsure of the specifics, that's why I'm bothering you lot. :)
[17:19:08] <Tom_itx> .dw is data word i believe
[17:21:27] <Tom_itx> Ox4C4A if you wanna see how it's done, write it in C then look at the assembler output
[17:21:33] <Tom_itx> then optimize it from there
[17:22:52] <Lambda_Aurigae> or just google for it..I found lots of examples.
[17:24:46] <Lambda_Aurigae> easiest way is to put it at the end of your code with a label
[17:24:48] <Lambda_Aurigae> like
[17:24:59] <Lambda_Aurigae> tablegoeshere: .db 1,2,3,4
[17:25:24] <Lambda_Aurigae> then reference the table with the label labelgoeshere
[17:26:21] <Lambda_Aurigae> xx: .db 1,2,3,4
[17:26:21] <Lambda_Aurigae> ldi zl,low(xx << 1)
[17:26:21] <Lambda_Aurigae> ldi zh,high(xx << 1)
[17:26:21] <Lambda_Aurigae> lpm r16,z+
[17:26:25] <Tom_itx> .db or .dw just says to reserve that much space in memory for each element
[17:26:28] <Lambda_Aurigae> not in order, obviously, but,
[17:28:52] <Lambda_Aurigae> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=87493&start=0
[17:30:17] <Lambda_Aurigae> third link down when I did a google search for avr lookup table in flash assembler
[17:30:42] <Lambda_Aurigae> http://www.piclist.com/techref/postbot.asp?by=thread&id=[AVR%3A]Look+up+Table&w=body&tgt=_top
[17:30:45] <Lambda_Aurigae> 4th link down.
[17:33:24] <Lambda_Aurigae> http://www.avr-asm-tutorial.net/avr_en/TESTLPM.html and right from the first avr assembly tutorial I ever read some,,,10ish years ago.
[17:34:06] <Lambda_Aurigae> kinda surprised it's still online
[17:34:13] <Lambda_Aurigae> but, it is still relevant and useful.
[17:40:03] <Lambda_Aurigae> woah! gavrasm supports many of the latest chip, even xmega stuff and the atmega1284p.
[17:40:04] <Lambda_Aurigae> didn'
[17:40:13] <Lambda_Aurigae> didn't realize it was still being developed.
[18:23:54] <Ox4C4A> Lambda - why the bitshift on the ldi though?
[18:28:47] <Tom_itx> sets a 1 into the bit i believe
[18:29:22] <Jartza> gaah
[18:29:44] <Tom_itx> haven't done enough asm to say definitely
[18:29:49] <Jartza> ok, my flash writing does work, but in wrong order :D
[18:30:16] <Tom_itx> endian
[18:30:39] <Jartza> yup
[18:40:05] <Ox4C4A> Tom - you mean the status register I?
[18:40:18] <Ox4C4A> Why would he want to enable interrupts? :D
[19:31:16] <clixx_IO> morning
[19:31:47] <clixx_IO> I am interfacing my AVR to some Toyota Coil-on-Plug Spark plugs
[19:31:56] <clixx_IO> https://plus.google.com/109366813998920635083/posts/P82zsRhjUuM
[19:47:27] <clixx_IO> Hi Jade, you are in Romania?
[19:48:03] <clixx_IO> what are you working on jadew ?