#avr | Logs for 2015-09-17

Back
[04:12:08] <fattest> can someone please help me with this question? http://i.imgur.com/NH03idw.png
[04:12:23] <fattest> its about avr instruction execution
[04:15:05] <elektrinis-wrk> 67
[04:15:25] <theBear> looks a lot like homework... you looked up ROL opcode yet ? cos you gonna wanna do that
[04:15:27] <fattest> elektrinis-wrk how did you do it?
[04:15:40] <fattest> i converted it to binary which gave 110011
[04:15:47] <fattest> and the C gets placed in the beginning
[04:15:47] <elektrinis-wrk> read on status register and C flag
[04:15:53] <elektrinis-wrk> and read on ROL instruction
[04:15:57] <elektrinis-wrk> then you will get it.
[04:16:24] <elektrinis-wrk> if beginning in in right side, then yes
[04:16:36] <elektrinis-wrk> rol - rotate left
[04:16:43] <theBear> http://www.atmel.com/webdoc/avrassembler/avrassembler.wb_ROL.html explains it nice and clearly
[04:17:24] <elektrinis-wrk> you don't even have to convert anything to get an answer.
[04:17:36] <elektrinis-wrk> shifting left is basically multiplication by two.
[04:17:43] <elektrinis-wrk> so 33*2=66
[04:17:52] <fattest> wow
[04:17:56] <elektrinis-wrk> and plus one is carried over.
[04:18:14] <elektrinis-wrk> hence C
[04:19:06] <fattest> thank you!
[04:30:15] <fattest> elektrinis-wrk can you help me with this question please? http://i.imgur.com/VhKYuNI.png http://i.imgur.com/YnFxXdh.png i know the first four bits start with 1010
[04:31:30] <fattest> and converting 65656(10) would give 1111, 1111, 1111, 1111(2)
[04:31:43] <fattest> but i only have 7 bits for the constant
[04:38:26] <tkoskine> fattest: There are two variants for LDS, 16-bit one and 32-bit one.
[04:38:51] <fattest> oh
[04:38:52] <fattest> ill try with the 32 bit one
[04:39:19] <tkoskine> Check section 74 from www.atmel.com/images/Atmel-0856-AVR-Instruction-Set-Manual.pdf
[04:42:33] <fattest> tkoskine i got 1001 0001 1111 0000 1111 1111 1111 1111
[04:42:36] <fattest> is that correct?
[04:43:45] <fattest> and converting that to hex will give 91F0FFFFh
[04:46:55] <tkoskine> fattest: Looks correct to me, but if you have AVR hardware, you probably want to test it there to be completely sure.
[04:47:07] <fattest> i dont have it
[07:50:48] <hetii> Hi :)
[11:19:37] <m4t> is it possible/likely for the ADC on an attiny to go bad?
[11:20:08] <theBear> possible, not sure about likely
[11:20:10] <m4t> i've got these capactative moisture sensors. a few of them have gone bad. not sure if it's pcb degradation or the attiny is bad
[11:20:23] <theBear> capacitive sensors can easily go bad
[11:20:38] <m4t> it's a loop on a pcb
[11:20:39] <theBear> and also a lotta things between them and a micro can make them seem bad
[11:20:40] <m4t> hrm
[11:20:55] <theBear> easy enough to test the adc
[11:21:04] <m4t> true.
[11:21:07] <theBear> tho err, you use adc with capacitive sensors ?
[11:21:31] <m4t> it's one of these https://www.tindie.com/products/miceuz/i2c-soil-moisture-sensor/?pt=full_prod_search
[11:21:45] <m4t> i've got them on my houseplants with esp8266
[11:21:56] <m4t> and it's annoying because the false readings constantly send me e-mail alerts heh
[11:22:10] <theBear> err, that says i2c, that definately shouts wtf are you doing with the adc ?
[11:22:42] <m4t> it's being used for a capacitative moisture sensor
[11:22:56] <m4t> a voltage is pulsed at a mhz or so
[11:23:00] <m4t> and it's read back with the adc
[11:23:11] <theBear> but, the sensor outputs i2c... oh you mean that is an avr on the pcb ?
[11:23:18] <m4t> yes
[11:23:29] <theBear> ahh
[11:25:18] <theBear> you tried taking it outta the pot and wiping/cleaning it for a first test ?
[11:25:39] <m4t> yeah the open air readings are fudged too
[11:25:42] <m4t> no change in fact
[11:26:22] <m4t> im just going to replace 'em i think
[11:27:18] <theBear> for that kinda price it's not a bad idea.. can always fiddle them later if yer got spare time
[11:28:01] <m4t> yup
[23:22:16] <_28_ria> Anybody can advice on what chips I could use in order to create a sata controller. The sata controller needs to be connected to some high speed data port on raspberry pi, or arduino (not usb)
[23:23:18] <_28_ria> I am trying to figure out how to make a nas appliance, based on raspberry pi, but where sata disks get connected directly to some high speed digital port, not usb.
[23:35:49] <Casper> _28_ria: the RPI, afaik, do not have any high speed bus accessible from the outside
[23:36:10] <Casper> also, do you plan to use raid?