Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
mngr9197yMaaaaaaaaaaan
I have been there too... :'(
don't suffer this way (unless you like it)
first: buy a logic analyzer.
and second: download atmel studio and use its debugger. (runs only on windows :'( )
ok, I have to tell that atmel studio does not like the fact that you are using arduino libraries... -
@mngr I bought one of those cheap knockoff usb logic analyzers, works wonders.
Also, I'm not using arduino libraries, I have to do "bare metal" so I'm using our school's compiler and the hwlib from my teachers (unfortunately) -
@mngr I have no experience with other compilers or libraries, if you want, you can take a look, since it's open source :P
https://github.com/wovo/hwlib - lib
https://github.com/wovo/bmptk - compiler -
mngr9197yAnd now... Let me says it:
"it is all in the datasheet"
took me months to understand that...
no need to reverse engeneer pinout, better read the right paragraph of the right chapter of a endless datasheet
spi master is easyer to reverse engineer, to do it in spi slave you have first to get CS and clock right ;) -
@mngr if only there was a datasheet for my version, I have 1.0 slave and I only found datasheet for 0.9 (things changed unfortunately) and the SD standards are absolute garbage xD
-
mngr9197y@FMashiro
Why did people write this?
is it really necessary to write c++ at hardware level?
let me explain: in some magic line of code, lost and hidden in the library you are using, there is something that can be resumed like this
*magic_address = magic_value;
every peripheral in your mcu has some dedicated memory addresses, writing things in these addresses let you interact with the peripheral, like an API.
these interactions are described in the datasheet.
the experience tells me that using library funcion and cabling random things to understand what the hell is doing is way too frustrating.
why did they make a new library? :'( arduino ide already supports c++ (I think)
atmel studio do support it for sure... And has a debugger! (yes, debugger for bare metal, compiled programs ) -
@mngr no idea what that entails, but feels good to know it's not as bad as you thought it was
-
@jespersh nah, there were some problems with bit shifting... My bad.
Later on I had another problem where the cs line would go low when told to, but would never become high again, appears to have been because of the led on the line...
It's all good and fixed now tho
Related Rants
-
cdrice105"You gave us bad code! We ran it and now production is DOWN! Join this bridgeline now and help us fix this!" ...
-
MoboTheHobo36My Friend: Dude our Linux Server is not working anymore! Me: What? What did you do? My friend: Nothing I swe...
-
tommy15Right now someone at Google is coding something useless for us to laugh at on April Fools.
Debugging SPI using LEDs...
This is just the worst
rant
hwlib
fml
bye bye weekend
spi
arduino due
hardware