#avr Logs

Feb 03 2018

#avr Calendar

12:13 AM nuxil: ahh... damn.
12:16 AM nuxil: SPCR0 |= (1 << SPIE0) | (1 << SPE0) | (1 << CPOL0) | (1 << CPHA0); .. forgot the SPIE0..
12:16 AM nuxil: now it works like a charm :D
12:16 AM Emil: nuxil: you might want to use = instead of |=
12:16 AM nuxil: yes sir :)
12:18 AM rue_: no time yet
12:19 AM rue_: do you mean the code I gave you?
12:19 AM nuxil: i just use the one in the datasheet with minor changes.
12:20 AM nuxil: there is a exmaple code there for spi master / slave
12:20 AM nuxil: and no worries. its working now. :)
12:56 AM thornekey: nuxil: no, no progress. randomly now doesnt drop on reset to 0 just goes to about 4v then back up to 5
01:14 AM thornekey: im getting these errors in avrdude for my ATmega8515 https://pastebin.com/phc8thdB
01:21 AM Xark: thornekey: Unknown signature 0x00000000 is "generic" error that means your aren't talking to AVR correctly (for any number of reasons).
01:23 AM thornekey: hm
01:23 AM thornekey: that only happens when i add -F
01:24 AM thornekey: if i remove that i get this: https://pastebin.com/mkbn5dDd , Xark
01:24 AM Xark: thornekey: Similar problem, no signs of life from programmer/device.
01:26 AM thornekey: when i use -v i get some info https://pastebin.com/5Vmhfz6W
01:26 AM nuxil: avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
01:26 AM nuxil: did you try using -B
01:27 AM nuxil: example -B12 and not -c
01:28 AM thornekey: so : -B12 usbasp -p m8515 -P usb 0.5 -U flash:v:.........
01:29 AM * Xark never got his usbasp to work (crappy design).
01:33 AM thornekey: hm
01:34 AM thornekey: earlier today it was detecting it
01:37 AM Emil: thornekey: were you the guy with the rw thingy
01:37 AM thornekey: whats rw
01:37 AM thornekey: so no
01:37 AM nuxil: idk. you broke it. :p
01:37 AM Emil: anycase what the fuck is that list of arguments
01:42 AM nuxil: anywho. it says that can not set sck period. so maybe you need to use the -B param and spesify the bit clock period.
01:43 AM rue_: Xark, want help with your asp?
01:43 AM thornekey: set to what amt?
01:43 AM rue_: no, ok
01:43 AM rue_: going to bed then
01:45 AM nuxil: thornekey, no idea. i think rue_ or Emil is more helpfull in this area. since i dont use any usb programmer.
01:45 AM Xark: rue_: Thanks, but I have a slew of working AVR programmers already.
01:46 AM Emil: thornekey: okay explain your thing to me and I'll try to help
01:48 AM polprog: nuxil: that vichy looks good. ill think about it ;)
01:48 AM thornekey: Emil: im using usbasp and atmega8515. ive checked all pinouts 1000 times. everything appears to be connecting fine. ive installed libusb-win driver and when i run avrdude i get target doesnt answer. expected signature for atmega8515 is 1E 93 06
01:48 AM thornekey: device signature 0x000000
01:48 AM Emil: thornekey: if you get zero then your connection is faulty
01:49 AM Emil: Or your device broken
01:49 AM Emil: or spi programming is disabled
01:49 AM thornekey: i see
01:49 AM thornekey: how can i determine which it could be
01:49 AM Emil: is it a readymade device?
01:49 AM Emil: or just a chip?
01:50 AM thornekey: the controller?
01:50 AM thornekey: is just a chip
01:51 AM Emil: What are the commands you are using?
01:52 AM thornekey: https://hastebin.com/lijacohula.txt
01:53 AM thornekey: just keeps saying AVR device initialized and ready to accept instructions
01:53 AM Emil: why are you specifying the bitclock?
01:54 AM Emil: wtf
01:54 AM thornekey: im using avrdudess (a gui interface for avrdude) and that sets its automatically when i choose usbasp
01:54 AM Emil: hmm
01:54 AM Emil: probably they are disregarded
01:54 AM Emil: try just
01:54 AM thornekey: i can use console and not specify
01:55 AM thornekey: so just remove -B
01:55 AM Emil: avrdude -c usbasp -p atmega8515 -e -U flash:w:firmwarename.hex:i
01:57 AM Emil: so umm
01:57 AM nuxil: i see this in one of your paste..
01:57 AM Emil: those fuses
01:57 AM nuxil: avrdude.exe: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
01:57 AM Emil: they disable spien
01:57 AM Emil: there is no extended fuse either
01:57 AM Emil: thornekey: so if you burned those fuses you can no longer use the usbasp
01:58 AM thornekey: umm
01:58 AM Emil: thornekey: also do you have a crystal?
01:58 AM Emil: or a clock source?
01:58 AM thornekey: negative
01:58 AM Emil: well
01:58 AM thornekey: on the board?
01:58 AM Emil: those fuses set ext crystal
01:59 AM Emil: /resonator
01:59 AM Emil: so you need one
01:59 AM thornekey: i have one i can add
01:59 AM Emil: thornekey: well, it doesn't matter if you burned those fuses
01:59 AM Emil: because you disabled serial programming
01:59 AM Emil: http://www.engbedded.com/fusecalc/
01:59 AM nuxil: time to hvp :p
02:00 AM Emil: -U lfuse:w:0x64:m -U hfuse:w:0xc9:m
02:00 AM Emil: those are the fuses I'd use
02:00 AM Emil: if I wanted to run on internal rc
02:00 AM thornekey: ok so on the calc it says i want a 1mhz?
02:01 AM Emil: though I don't know what ckopt is
02:01 AM thornekey: damn i have a 6 and 16
02:02 AM Emil: -U lfuse:w:0x64:m -U hfuse:w:0xd9:m
02:03 AM Emil: bro
02:03 AM Emil: if you disabled serial programming
02:03 AM Emil: you need a high voltage programmer :D
02:03 AM Emil: okay so you want to use ckopt
02:04 AM Emil: wait
02:04 AM thornekey: this one only goes up to 5
02:04 AM Emil: does it even matter for internal
02:05 AM Emil: okay so it should always be unprogrammed with internal
02:05 AM Emil: -U lfuse:w:0x64:m -U hfuse:w:0xd9:m
02:05 AM Emil: so those are the fuses I would use
02:06 AM nuxil: thornekey, did you watch the video i posted earlyer about how fuser work and what they do ? i even told you to get your code uploaded before you mess with fuses :p
02:07 AM Emil: internal rc oscillator at 8MHz with longest startup, SPI programming enabled and no bod
02:07 AM thornekey: yeah nuxil i didnt think i had set any
02:07 AM Emil: thornekey: what did you say you use for programming?
02:07 AM Emil: some gui shit
02:07 AM Emil: oh boi
02:08 AM Emil: just move to lenux, it's nice on this side of the fence
02:08 AM thornekey: avrdudess. its just a ui interface that i assume just generates the command line
02:08 AM thornekey: im using the console rn instead of that
02:08 AM thornekey: but still getting the same thing happening
02:08 AM Emil: well, dunno if the issue is with the user or the software ;)
02:08 AM Emil: thornekey: mate
02:08 AM Emil: are you not listening
02:08 AM Emil: you
02:08 AM Emil: need
02:08 AM Emil: a
02:08 AM Emil: high
02:08 AM Emil: voltage
02:08 AM Emil: programmer
02:08 AM Emil: if you disabled spi programming
02:09 AM Emil: as by those fuses it seems
02:09 AM Emil: if you burned 1F E9 at some point that disables SPI programming
02:10 AM thornekey: ok i cant be stuffed waiting for a high voltage one but there are 5v ones locally. so if i get that tomorrow what should i do and NOT do
02:10 AM Emil: mate
02:10 AM nuxil: thornekey, just get a new chip. or use jtag if that possible.
02:10 AM Emil: there is nothing you can do
02:10 AM thornekey: ok
02:11 AM nuxil: thornekey, i done same mistake myself :p
02:11 AM nuxil: but on a atiny85. so it was a easy fix
02:11 AM Emil: nuxil: disabled spi programming?
02:11 AM nuxil: yes
02:11 AM Emil: heh
02:12 AM nuxil: i had to make my own hvsp for it.
02:13 AM nuxil: but thats easy on tinys. worse with atmegas that use hvpp
02:13 AM thornekey: so i could make a resetter?
02:13 AM thornekey: oh
02:13 AM thornekey: hm
02:14 AM nuxil: yes you can if you want to waste your time on it.
02:14 AM nuxil: the datasheet should have a section about hvpp
02:14 AM thornekey: or just get a new chip
02:14 AM thornekey: instead
02:14 AM nuxil: jup
02:14 AM thornekey: ok
02:15 AM thornekey: so the isp isnt screwed just the chip
02:15 AM thornekey: ill buy 2 this time XD hahaha
02:15 AM nuxil: never buy just 1 chip :p
02:15 AM thornekey: yea
02:15 AM thornekey: i thought this would be a little entry project into avr
02:15 AM thornekey: thats why i got 1
02:15 AM thornekey: LOL
02:17 AM nuxil: get atiny85 while your at it. cos they rule :D and is easy to fix up fuse fuckups.
02:19 AM nuxil: imo atiny's are the best chips as "entry" project into avr's
02:19 AM nuxil: easy chips to get started with.
02:20 AM thornekey: ohk i will get that too :)
02:21 AM thornekey: so when they come, what console command should i use (ignoring the fuses to begin with)
02:22 AM Emil: thornekey: https://emil.fi/avr
02:22 AM Emil: thornekey: for intro into avr I'd just use some arduino clone instead of bare chips
02:23 AM Emil: thornekey: anycase that page of mine details commands you might be interested in
02:23 AM Emil: and regarding fuses, read before you change them blindly
02:25 AM thornekey: thanks :)
02:25 AM thornekey: hah the first sentence.
02:25 AM thornekey: me.
02:26 AM thornekey: used the gui
02:36 AM * nuxil is peeking around Emil's site
02:37 AM nuxil: Emil, whats bussit ?
02:42 AM Emil: nuxil: buses
02:43 AM nuxil: oh. lol...
02:43 AM Emil: nuxil: bus schedules for two stops near me
02:43 AM Emil: I tried out libcurl
02:43 AM Emil: thornekey: it's okay, it's a learning experience :D
02:44 AM nuxil: it updates every min?
02:44 AM Emil: thornekey: order a couple of arduino uno clones from ebay, they cost like 2€/piece
02:44 AM Emil: nuxil: yeah, cronjob :D
02:44 AM Emil: nuxil: it's super wasteful but ohwell :D
02:44 AM nuxil: :)
02:45 AM Emil: hmm, it seems one of them is broken
02:47 AM thornekey: cool i will get the clones
02:47 AM Emil: thornekey: and then you can just use gcc and avrdude to program them
02:47 AM Emil: don't use arduino ;)
02:48 AM Emil: thornekey: also buy a couple of atmega328p dip chips if you want to experiment
02:48 AM Emil: and a couple of breadboards
02:52 AM thornekey: i got a few breadboards :)
03:41 AM gregor2: Hello
03:48 AM gregor2: I want to try out my LCM-S01602DTR/A. This is a HD44780 lcd display.
03:49 AM gregor2: My own code does what I am expecting but it does not work.
03:49 AM gregor2: https://pastebin.com/p77rZFHC
03:52 AM gregor2: I am trying to compile this demo Project but i am getting "undefined reference to `uart_init'" and other functions.
03:52 AM gregor2: http://www.nongnu.org/avr-libc/user-manual/group__stdiodemo.html
04:01 AM Emil: gregor2: >undefined reference
04:02 AM Emil: you need to define your function first
04:08 AM gregor2: I am just compiling a demo Project when getting the undefined references.
04:09 AM gregor2: I have sent a link. It is called stdiodemo.c and I have downloaded all of the source files on the page. The functions are defined there.
04:09 AM gregor2: I am compiling like this
04:09 AM gregor2: avr-gcc -g -mmcu=atmega328p -Os -c stdiodemo.c -o stdiodemo.o
04:10 AM gregor2: avr-gcc -g -mmcu=atmega328p stdiodemo.c -o stdiodemo.elf
04:11 AM gregor2: lcd_putchar, uart_putchar, uart_getchar, uart_init and lcd_init are undefined says the linker.
04:11 AM gregor2: but they are actually.
04:14 AM Emil: gregor2: you need to link dem files bro
04:14 AM antto: i don't understand commandline compiling too much, but aren't you building an object with the first step?
04:14 AM gregor2: yes i am
04:14 AM gregor2: that was a mistake
04:15 AM antto: then, don't you need to use that object in the second step?
04:15 AM gregor2: avr-gcc -g -mmcu=atmega328p stdiodemo.o -o stdiodemo.elf
04:15 AM gregor2: thats what i actually wanted to do but it makes no difference
04:15 AM antto: *shrug*
04:15 AM antto: i compile via the IDE
04:15 AM gregor2: how can i link the demo files?
04:16 AM gregor2: ok i will try something
04:16 AM gregor2: do i need the *.h files actually?
04:17 AM antto: you need a commandline compiler expect here ;P~
04:17 AM * antto turns on the red emergency lamp
04:18 AM gregor2: avr-gcc -g -mmcu=atmega328p -Os -c hd44780.c -o hd44780.o
04:18 AM gregor2: this does not work at all.
04:18 AM gregor2: I have no idea what to do.
04:19 AM antto: either that demo is broken (or too old), or the instructions for building it are not clear
04:19 AM antto: or something like that
04:21 AM gregor2: There are no instructions for building
04:22 AM antto: great demo then
04:24 AM antto: i think my IDE builds by compiling each source file sepparately into an object, and then links all those objects as a last step
04:24 AM gregor2: I actually just want to try out if the lumex LCM-S01602DTR/A works.
04:24 AM gregor2: What i am actually about is writing a programm with assembler myself.
04:24 AM gregor2: https://pastebin.com/p77rZFHC
04:24 AM gregor2: here this is my code
04:24 AM antto: asm x_x
04:25 AM gregor2: Yes isnt that great?
04:25 AM antto: no
04:25 AM gregor2: It does exactly what it should.
04:25 AM gregor2: But it does not work.
04:25 AM antto: and i have no idea what it does by looking at it
04:25 AM gregor2: I just dont have enough knowlage about HD44780
04:25 AM gregor2: Ok
04:26 AM gregor2: It just outputs the numbers definde at line 10.
04:26 AM gregor2: on port D
04:26 AM Emil: gregor2: https://emil.fi/d/makefile
04:27 AM gregor2: Every second one on PORTD and every otherone on portB
04:27 AM gregor2: Whats that?
04:27 AM Emil: a super simple makefile that handles files nicely
04:27 AM gregor2: Ok
04:28 AM gregor2: but how can i talk to the device in my own code?
04:28 AM gregor2: I am putting out bytes on portd
04:28 AM gregor2: and one Pin is just blinking so on every falling edge the right byte is sent.
04:29 AM gregor2: also it waits for pin7 to become low befor sending the next byte.
04:30 AM gregor2: Because that is the busyflag.
04:33 AM gregor2: Just outputs byte after byte on portd everytime with a falling edge on PB1 (Enable).
04:34 AM gregor2: After every byte sets the RS to 0 and R/W to 1 and waits for the busyflag to clear.
04:34 AM gregor2: But i dont know why this does not work.
04:34 AM gregor2: Anyone has some experience with the hd44780?
04:35 AM antto: not me, but i've messed with one LCD and it required some initialization before you can start playing with characters on the screen
04:36 AM gregor2: ok
04:37 AM gregor2: I have found an interresting page now
04:37 AM gregor2: I have not done some initiallisation as you said!
04:51 AM gregor2: I did it now
05:56 AM polymorph: gregor2: https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller
06:28 AM mudkip908 is now known as Guest77468
07:41 AM xprior_ is now known as xprior
09:48 AM nuxil: therer are tonz of libs for hd44780
09:49 AM antto: i shovel them off the front porch every morning
09:49 AM nuxil: even my display is based on it. but its not paralell. but i2c but still uses same commands afik.
09:57 AM polprog: odered an stm8 discovery
09:57 AM polprog: for the stlink mainly
09:58 AM polymorph: hi polprog sup
09:58 AM polprog: yo
09:59 AM polymorph: btw did you see my creation?
09:59 AM polprog: im ill :( but getting better
09:59 AM polprog: what creation?
10:00 AM polymorph: my latest creation: The poker and the vampire https://ibb.co/cDbZER https://ibb.co/gdw1uR https://ibb.co/irQGTm https://ibb.co/ncV5M6
10:00 AM polymorph: from yesterday
10:01 AM polprog: vampire tap?
10:01 AM polymorph: y
10:01 AM polprog: nice
10:02 AM polymorph: and a simple stainless steel poker, with a safety cap ;)
10:03 AM polymorph: it pokes through oxide layers
10:04 AM polymorph: sois mostly good contact with small orce
10:04 AM polymorph: *force
10:10 AM nuxil: what are you gonna do with that ?
10:11 AM polymorph: with wht
10:11 AM nuxil: https://ibb.co/ncV5M6
10:12 AM polymorph: that bites on the coble and the needle goes in the copper braid
10:12 AM polymorph: and i can measure its potential or even resistance
10:13 AM polymorph: ithese are measuring devices
10:14 AM polymorph: i have 2 pokers now an my multimeter, but sometimes it would be good to have one, and some ground clamp or vmpire
10:15 AM polymorph: i would also need some thin wire gripper thing that can hold on a soic lead
10:17 AM nuxil: let me rephrase my question.
10:17 AM nuxil: why do you need that.
10:21 AM nuxil: i know what a vampire tap is. or percing tap as some call it. but why do you need one.
10:22 AM nuxil: are you gonna tap into your neighbor phoneline :p
10:23 AM polymorph: nuxil: for attaching securely a multimeter lead to some wires
10:23 AM polymorph: and i would need something like this too ;/ http://parrot-invent.com/old/smd_test_leads.htm
10:23 AM polymorph: i had something similar but it was junk
10:24 AM nuxil: i have several types of these.
10:24 AM nuxil: most of them are junk
10:24 AM nuxil: fragile
10:25 AM nuxil: cheep chinees crap you know :P
10:29 AM polymorph: ya, plastic and brass
10:29 AM polymorph: i might be able to make one from stainless steel
10:29 AM polprog: those are cool
10:30 AM polprog: i have those hooks on my scope but having them for the multimeter would be awesome
10:30 AM polprog: i bought a soic clip recently as well
10:32 AM polymorph: hm cheap shit https://www.ebay.com/p/12pcs-GRABBER-Test-Hook-Clip-Probe-6-Color-Multimeter-Test-Tools-for-SMD-IC/506431570?iid=272687633925
10:32 AM polymorph: i like cheap but not shit, rather get a stainless steel one
10:33 AM nuxil: yes its worth it. these cheep ones breaks apart just by looking at them
10:33 AM polprog: fack. sdcc is not in pacman. i hope it will be in dpkg debian repo (otherwise ill have to try pkgsrc and then building from source)
10:35 AM polymorph: is this ok? https://i.ebayimg.com/images/g/NeoAAOSw1BlZOQnW/s-l500.jpg
11:01 AM Guest77468 is now known as mudkip908
11:13 AM nuxil: polymorph,
11:13 AM nuxil: thouse look good. but you also just want the hook type
11:14 AM nuxil: like these http://probemaster.com/8050-sprung-hook/
11:14 AM nuxil: gold plated
11:18 AM nuxil: probmaster is know to have good quality afik.
11:29 AM polymorph: that looks crap
11:29 AM polymorph: i had plastic ones, they don't last
11:29 AM polymorph: and it is just a pain in the ass if they break
11:36 AM nuxil: probmaster is not know for making crap.
11:38 AM nuxil: *known
11:38 AM nuxil: the color looks crap tho :p
11:51 AM polymorph: kek china 5V power charger https://www.youtube.com/watch?v=ehYYoU13i-I
12:13 PM nuxil: hehe his accent :)
01:25 PM antto: daengaROOS!
01:26 PM nuxil: hehe
01:27 PM nuxil: i just kept on watching him. cos i find his accent funny
04:00 PM day__ is now known as day
05:26 PM mudkip908_ is now known as mudkip908
05:28 PM tehBear is now known as theBear
07:10 PM lemgrago: Can anyone help me understand why Atmel Studio is failing to upgrade my Atmel ICE's firmware, plz?
07:14 PM lemgrago: well, that sucks
07:14 PM nohit: hmm
07:14 PM nohit: i think i had a similar problem, but cant remember
07:15 PM nohit: this is exactly why i use notebooks now
07:16 PM nohit: is it connected to a usb hub ?
07:16 PM nohit: or straight to pc
07:16 PM lemgrago: no, directly to port
07:16 PM lemgrago: but that port is being passed to a VM
07:17 PM nuxil: that most likely your problem
07:17 PM lemgrago: so, i was thinking that might be a problem
07:17 PM lemgrago: yeah
07:17 PM nohit: yes
07:18 PM lemgrago: do you know if atmel studio has a log I can look at to see why the upgrade fails
07:18 PM nohit: idk
07:19 PM nohit: i dont really use it
07:19 PM nuxil: idk. i think verry few people in here uses atmel studio. we mostly code in our fav editor and use make files.
07:19 PM lemgrago: yeah, i just wanted to use a debugger
07:20 PM lemgrago: atmel studio + atmel ICE is the only method I know of
07:20 PM nuxil: hold on... i saw something cool on eevblog
07:20 PM nuxil: let me find it
07:20 PM nuxil: http://www.eevblog.com/forum/microcontrollers/avrarduino-hardware-debugger-on-the-cheap/
07:20 PM nuxil: debguuing
07:20 PM nuxil: *arg
07:21 PM nuxil: debugging.
07:21 PM lemgrago: that is too cool
07:21 PM lemgrago: thank you so much
07:21 PM nuxil: np :)
07:21 PM lemgrago: i am a little mad at myself for buying the ICE now
07:22 PM nuxil: hehe. i just made myown using a raspberry pi :)
07:24 PM lemgrago: debugging directly from a pi's gpio??
07:24 PM nuxil: yea. using the built in debug wire
07:25 PM nuxil: ar,, no
07:25 PM nuxil: just the programmer.
07:25 PM nuxil: i have plans on explanding it to include debugging.
07:25 PM nuxil: but atm im busy with another project
07:26 PM lemgrago: still that's pretty cool
07:26 PM nohit: lemgrago use another pc to upgrade it. i bet it'll work just fine after that
07:27 PM lemgrago: nohit: like directly instead of passing through to a VM?
07:27 PM nohit: yes
07:29 PM lemgrago: nohit: yeah i'll give that a try. i just don't have access to a windows machine atm. but, i'll make one. gotta get my moneys worth out of this debugger XD
07:36 PM nuxil: lemgrago, how much did you pay for it?
07:37 PM lemgrago: nuxil: i think something like 70 or 80 usd
07:37 PM nuxil: o.O
07:37 PM nuxil: you kidding me right?
07:37 PM lemgrago: unfortunately not
07:37 PM nuxil: damn. thats expencive.
07:39 PM lemgrago: _way_ too expensive
07:39 PM nohit: if you cant wait, set the simulator as your debbugger
07:40 PM nohit: and play with it
07:40 PM lemgrago: simulator?
07:40 PM nohit: yeah there's a built in simulator in atmel studio
07:40 PM lemgrago: i was not aware
07:41 PM lemgrago: thank you
07:41 PM nohit: np
07:46 PM nohit: that's actually damn helpful if youre doing assembly programming and just wanna see what happens in the registers/memory
08:21 PM nuxil: hmm. my spi slave is acting weird.
08:23 PM nuxil: im sending a sequence of numbers to my spi slave "atmega" and display these numbers on a display.
08:23 PM nuxil: spi signal line looks like https://gyazo.com/720377716d48d29f4836b6cb8989b01e
08:24 PM nuxil: so it master starts to send from 1-til 255
08:24 PM nuxil: but the thing is. my slave is ski8pping numbers. it goes 1 - 3 - 5 -7 9 so on.
08:26 PM nuxil: this is the simple test code in the slave. https://pastebin.com/0dyh4PkT
08:27 PM nuxil: so i dont get it why it skips a number or add +1 to it.
08:28 PM nuxil: the test led blinks each time the isr triggers so i know there is nothing wrong with the data sent to it. i can see that on the analyzer aswell.
08:28 PM nuxil: *led toggles.
08:29 PM nuxil: so. wtf is going on :p
08:47 PM nohit: strange
08:48 PM nuxil: https://gyazo.com/686007aa6ea4e8e006569c5200154ba2
08:48 PM nuxil: yews
08:48 PM nuxil: i dont get it
08:54 PM nuxil: here is the simple test main of the master . https://pastebin.com/6b5gJbQE
08:54 PM nuxil: i dont see anything wrong with it actually as in that "i" shoud be 1 -3 -5 so on.
08:55 PM nuxil: nohit, ideas?
08:56 PM nohit: i=i++; never seen anyone do that
08:57 PM nuxil: ups.
08:57 PM nuxil: that should be i++
08:57 PM cehteh: how abozut a for loop :D
08:57 PM nuxil: for (;;) ?
08:58 PM cehteh: for (uint8_t i=0;++i;)
08:58 PM nuxil: or a for loop in the range
08:58 PM cehteh: crappy code anyway, too much delay
08:58 PM nuxil: yea. but as you see on my picture from the analyzer. the data sent is correct
08:59 PM nuxil: yes its just test code
08:59 PM cehteh: and the if() too
08:59 PM cehteh: why test it on each iteration when it flips only once
09:00 PM nuxil: the if code is for the two mcp4131 chips turning the potmeters up and down. and it works
09:00 PM nuxil: just test code
09:02 PM nuxil: its the atmega "spi slave" thats acting weird on me.
09:11 PM nuxil: this is verry strange. i'll try a for loop and send data to just the slave.
09:11 PM nuxil: *atmega slave
09:18 PM nuxil: nop. now i only do; for (uint8_t t = 0; t < 256; t++) {mcp23008_data(MCP23008_CS_M324, t); _delay_ms(1000); }
09:18 PM nuxil: and it still goes 1-3-5-7 so on.
09:19 PM nuxil: and data on the line is correct. 1 - 2 - 3 :\ when i look with my logic analzyer
11:02 PM nuxil: im at a real loss here.
11:03 PM nuxil: https://gyazo.com/6b453bda0cfdc4d9cd10c5debfd5790e data is def looking good on the spi bus.
11:03 PM nuxil: https://gyazo.com/b81f51cd6a3c5b4197343d794b9d7958 master send test.
11:04 PM nuxil: but the slave just go 1-3 , 1-3
11:48 PM day__ is now known as day