#avr | Logs for 2015-04-19

Back
[04:21:25] <rue_shop3> anyone awake want to look for a problem in my code?
[04:21:35] <rue_shop3> m328, the pwm isn't working
[04:21:42] <rue_shop3> dotn know what I missed
[04:22:46] <rue_shop3> http://pastebin.com/hg8B4jug
[04:23:01] <rue_shop3> I:
[04:23:10] <rue_shop3> - remembered to call the pwm init fuction
[04:23:20] <rue_shop3> - am setting it to a value
[04:37:14] <rue_shop4> - you are uploading code from the wrong FOLDER to the avR!
[04:37:36] <rue_shop3> fffffffffffffFFFFFFFFFFFFFFFfffffffFFFFfffffFFFffFFFfffffFFFffffFFFFfffff
[04:39:24] <rue_shop4> this is why you cant let him code past 1am
[04:45:37] <rue_shop4> well, just filtering the pwm and pushing it back into the adc comes out pretty good
[04:45:45] <rue_shop4> only about 2 or 3 counts off
[04:46:31] <rue_shop4> see if we can close a feedback loop
[04:46:51] <rue_shop3> simple mistake and I can tell I'm not gonna hear the end of it for... *ages*
[04:47:45] <rue_shop3> dude, I need all terrain wheels on this shop chair
[04:48:04] <rue_shop3> there is a screw stuck in one of the wheels, nowonder the floor wears down so much
[05:27:23] <rue_shop4> your ability to program a proportionite feedback loop sucks...
[06:13:57] <rue_shop4> since when is 512-608 = 415!?
[06:14:40] <rue_shop3> technically, its answer is -415
[08:22:59] <ehsanv> hi. how i use ADC for measuring external circuit? i connected external circuit's GND to avr's GND, then AVR goes out! voltmeter says +3.2v between two GNDs... please help me thanks :)
[08:26:21] <malinus> ehsanv: you forgot to link to your schematic and the rest of your explenation.
[09:09:07] <Crak> hi all
[09:09:30] <Crak> i am trying to use the simulation under atmel studio 6
[09:10:00] <Crak> but in the io view nothing changes
[09:10:27] <Crak> i press 'Alt+F5' then F11
[09:10:42] <Crak> do i have to config anything else to use the simulation?
[15:43:47] <Crak> hi all
[15:44:26] <Lambda_Aurigae> not yet.
[15:44:29] <Lambda_Aurigae> oh..hi, not high.
[15:44:31] <Lambda_Aurigae> nevermind.
[15:44:33] <Lambda_Aurigae> hello
[15:45:19] <Crak> i would like to access a .db at a certain index. adiw ZH:ZL, 6 does work pretty well. but i want to do it adiw ZH:ZL, r16
[15:45:30] <Crak> how can i accomplish this?
[15:45:38] <Crak> any ideas?
[15:45:54] <Lambda_Aurigae> a .db?
[15:45:58] <Lambda_Aurigae> as in, database?
[15:45:59] <Crak> yes
[15:46:02] <Crak> no
[15:46:07] <Lambda_Aurigae> .db is database
[15:46:11] <Crak> assembly .db directive
[15:46:16] <Lambda_Aurigae> or, has been for about 30 years in the computer world.
[15:46:59] <Lambda_Aurigae> advanced assembly on avr isn't a strong point..I could look it up but so could you.
[15:47:38] <Crak> Lambda_Aurigae: well, i am trying to look it up for a couple of time now
[15:50:19] <Crak> this is my 'array' -> digits: .db 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f
[15:50:25] <Lambda_Aurigae> are you using a label in front of the .db?
[15:50:28] <Lambda_Aurigae> ok..so you are.
[15:50:35] <Lambda_Aurigae> then you can just reference it.
[15:50:43] <Lambda_Aurigae> http://www.avrfreaks.net/forum/db-directive-how-use-it
[15:51:03] <Lambda_Aurigae> in the tx_string: function
[15:52:45] <Crak> well there the Z-Pointer is only incremented
[15:52:54] <Crak> but i need to set it to position n
[15:53:02] <Lambda_Aurigae> so add.
[15:53:11] <Crak> adiw does work with numbers
[15:53:13] <Lambda_Aurigae> math is your friend.
[15:53:39] <Crak> but not with adiw ZH:ZL, temp
[15:53:49] <Crak> in temp is the position i need
[15:54:39] <Crak> is there a way to do it?
[15:55:04] <Lambda_Aurigae> I don't know.
[15:55:20] <Lambda_Aurigae> I'm sure there is. someone else might chime in and be able to help.
[15:57:00] <Crak> i can put it into sram
[15:57:05] <Crak> then LDD would be my friend
[15:57:22] <Crak> but i thought i can handle this using .db
[15:57:54] <Crak> i read that if u have constanst .db is ur friend
[16:15:01] <Lambda_Aurigae> whoever this u person is.
[16:15:05] * Lambda_Aurigae has no idea.
[16:15:38] <Lambda_Aurigae> I don't do enough AVR assembly though.
[16:15:54] <Lambda_Aurigae> mostly it is some inline assembly for timing critical stuff like video generation.
[16:21:14] <Crak> i found something: LD temp, Y+; clr temp2; add ZL, temp ; adc ZH, temp2; lpm temp, Z
[16:35:59] <Xark> Crak: Something like http://hastebin.com/ozofudecef.avrasm
[16:36:45] <Xark> (e.g., that loads element 2 of digits table [0x5b])