Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
some kinda jackal
Feb 25, 2003

 
 
Question: I'm kind of fuzzy on the PIC infrastructure. How much do the optimization limitations of their free compiler actually affect you guys? I am imagining scenarios where you really only start to see it if you have some crazy large firmware you've designed and for like 99% of users out there their free implementation is probably fine?

All this talk about microchip got me thinking about PICs and I think I'm going to pick up a cheap pickit 3 and just give their thing a whirl. Why not, right?

Adbot
ADBOT LOVES YOU

some kinda jackal
Feb 25, 2003

 
 

isr posted:

It kind of depends on what you're doing. The free version of XC8 will bloat the code needlessly, for example, you'd expect this C code:
code:
uint8_t n;
n++;
to compile to this:
code:
incf n
but in free XC8 it will actually compile to something like

code:
movf n,w
inc w
movwf n
So if you want to do tight timing, you might have some problems. You can always write C for things you want to write in C, and then if needed link against hand-rolled asm.

Also, C just isn't really a good fit for the 8-bit architecture. So you'll probably eventually run into problems with pointers not doing what you think they should, strange problems that you'll have to look into the asm to solve, etc.

XC16 for PIC24/dsPIC is a lot more decent, and I've had less problems with it. The space constraint on a 16 bit part is a lot less important, too.

Hmm. Thanks for this. All my experience right now is using AVRs where I can be fairly confident that GCC won't gently caress me needlessly for code size, but I have no way of judging how efficient it is. I /THINK/ Atmel Studio just relies on GCC so it's probably fine, but I dunno. I was hoping to just dick around with PICs for a day or so, so I may try it regardless. Can't hurt to have your hands in more than one architecture. At the end of the day it's just flipping different registers so it can't be all that different :)

some kinda jackal
Feb 25, 2003

 
 
If you wanted a free TI Stellaris TiVo Tiva dev board, here's a $25 off coupon for TI's e-Store:

Coupon code: National-1yr

Valid until 30-September.

If you order 2 your total comes to like $1, shipped depending on where you live. I knew I read hack-a-day for a reason.

edit: Their site is super hosed right now though. As if their entire order system was running off one Stellaris board.

edit2: I just ordered a Tiva and a MSP430 Launchpad. Always wanted to try that platform :3:

some kinda jackal fucked around with this message at 20:59 on Sep 18, 2013

some kinda jackal
Feb 25, 2003

 
 
Well I wondered how many free $25 devkits they would ship out before axing this :haw:

some kinda jackal
Feb 25, 2003

 
 
According to TI's site, my poo poo is still "Processing" :mad:

some kinda jackal
Feb 25, 2003

 
 
Is anyone here familiar with IAR Embedded Workbench? I have the 16kb limited Kickstart version that I got from STM that works just fine for my needs right now, but I'm thinking about picking up the AVR version as well. Will the two integrate into each other, or will I be stuck with two separate installs, one for AVR and one for ARM?

And yes, I realize that Atmel Studio is free, but I'm not going to be footing the bill for this so whatever :)

some kinda jackal
Feb 25, 2003

 
 

EpicCodeMonkey posted:

They'll be separate, and (at least from my installs) it will then break every freaking project file since it will prefer one IDE version over the other, causing errors if the wrong one auto-opens.

Wow. Okay hmm. That's pretty awful :(

some kinda jackal
Feb 25, 2003

 
 
Yeah, I've just been using IAR because I got that neat Kickstart version (and it's really just been all I needed for now). I was hoping to leverage the familiarity for an AVR IDE but I guess that's not likely to happen since it's such a mess. I could use a different VM for each one, but :effort:. I was kind of thinking about dicking around with Rowley's stuff since it's not expensive for hobbyist versions, but quite frankly the demo kind of put me off. It's lacking some features that the nicer IDEs have. I guess you get what you pay for.

I'm fine with using Atmel Studio, it's just a little bloaty :(

some kinda jackal
Feb 25, 2003

 
 
Hey gang. I bought a new car so I want to put a neat garage door opener in it. In true nerd fashion I want to DIY this. Obviously the programming aspect of it isn't difficult. It'll just be two uC's handshaking over some kind of wireless sensor network. That's kind of where I break down though. Xbee is definitely one way to do this, but Xbees seem to be kind of pricey per-unit. I was hoping to do this whole thing for under $20. Any recommendations for lower cost wireless UART communication? The range literally only has to be like 20 feet so I don't need anything super fancy. I just don't really know what my options are other than the Xbees I'm familiar with.

some kinda jackal
Feb 25, 2003

 
 

Delta-Wye posted:

Sparkfun has a bunch of dumb wireless modules that may work for you. Are you thinking you'll need bidirectional communication?

It's entirely possible that I won't. I haven't really put too much thought into the firmware yet. I can probably just have the remote provide a simple key to my base station that'll be wired up to my physical opener in the garage and the base station doesn't really need to respond back unless I plan to do something fancy like light an LED or something in the car. I'm sure for security I'll give it a little more thought than this but thanks for the suggestion!

edit: I might grab a few of these to play with: https://www.sparkfun.com/products/12031

some kinda jackal fucked around with this message at 04:33 on Dec 5, 2013

some kinda jackal
Feb 25, 2003

 
 
I can't say no to a $12 bag of chinese electronics. Ordered just for the hell of it :haw:

Thanks for the help guys. I'll look into libraries and such, but I won't mind if it's a complete DIY right down to the code :)

some kinda jackal
Feb 25, 2003

 
 

Luigi Thirty posted:

e: Wait do I have to solder them to the board or something? Ugh, I don't know how to do that.

Welp, never a better time to learn than now :)

some kinda jackal
Feb 25, 2003

 
 
Have to give some props to MAKE: AVR Programming:

http://shop.oreilly.com/product/0636920028161.do

Pretty good book for idiots like me. Explains a lot of things in detail. If you're new to embedded development and want to learn AVR stuff, this one seems pretty solid from my initial readthough.

some kinda jackal
Feb 25, 2003

 
 

Rescue Toaster posted:

Well, the arm-none-eabi toolchain has come a long way in ease of use. I was able to setup Eclipse 4.3, the arm plugin, the toolchain, openocd, and run hello world on my old stm32f4discovery in about 30 minutes (on windows, even). Pretty nice!

I wonder if the best way to get the various headers and cpu-specific stuff is to install atollic and rip it out of there.

Did you use any particular instructions to get everything up and running or did you piece it together yourself?

I'm kind of off ARM in favour of AVR at the moment, but I'm always looking for fun projects and I've been meaning to get an opensource-ish ARM toolchain/ide combo working again.

Adbot
ADBOT LOVES YOU

some kinda jackal
Feb 25, 2003

 
 
Aww yiss, guess who got a J-Link EDU in the mail today. Finally gonna put that LPC800 through its paces!

  • Locked thread