Help!

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have problem. Need help immediately. What is wrong with my code. It doesn't work but I know it is right.

I would like someone to email me the correct code. Quickly please.

The circuit is correct to.

:lol: sorry about that... just debugging and I thought I would try asking for help in the manner I so often see on here. Just a little humor....nothing to see here....move along....

Go electric!
Happy electric car owner / builder

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Replace the

[/code:1] with [code:1]

and it might work ...

Is this for the new AVR32 architecture BTW ?? top secret code :D

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This code should work in your application.

I always try to provide some useful content in my replies
.
Enjoy!

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oops! Wrong forum. This was meant as a private message for the MIT PIC list. Please destroy any downloaded versions of the digipot.c file.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried to compile your code and it doesn't work anyway. But I think I fixed it with a few keypresses in vi, as suggested by my classmate:

1GdG:wq

It compiles now, but my entirely correctly attached LED stopped blinking. HELP!!!! ZOMG I need it ASAP!

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AAAAH GUYS!!! 3 MINUTES AND NOT A SINGLE REPLY WTF??!?! Bad, bad forum!

I need this Bluetooth GPRS Modem working right now!! HELP!

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

:lol: I knew there was some humor on this board somewhere!

Thanks for the replies. I've got it working now. All I had to do was add "/*" at the beginning and it compiled really fast! no errors! yeah!

Go electric!
Happy electric car owner / builder

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Good work!

I was only kidding about the digipot.c source file being for a PM on the MIT PIC list. It is something I did about 7 years ago. Download it freely and knock yourself out. Please don't email me if it won't compile for the AVR!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

zoom, the real question about your code though, what C compiler did you use for PIC? Initially my reason #1 for switching to AVR was inexsitence of a free C compiler for PIC and reason #2 was that the code I've seen for commercial PIC C compilers looked more like B code, effectively assembler in disguise.

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I used the CCS PIC C compiler. I just noticed that there were many lines of text from me noodling something out at the beginning of the file....

http://www.ccsinfo.com/picc.shtml

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, the beginning of your file looks like you were on the verge of switch too.

[Edit] Here's my typical nightmare before switching to AVR. Those are i2c routines to send text to display. If I could use highlightling in asm files, I'd paint every BANKSEL pseudo-instruction bold, bright red on lime background.

Attachment(s): 

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Geez, bankswitching in assembly for PIC, I still get shivers.

Open the pod bay doors, HAL.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Geez, bankswitching in assembly for PIC, I still get shivers.

Aww..the PIC is easy to program....but it's just sooo slow :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

billywindows wrote:
Geez, bankswitching in assembly for PIC, I still get shivers.

He he ...
I remember getting really frustrated at these messages:

test.asm:371:Message [302] Register in operand not in bank 0. Ensure bank bits are correct.

Until I learnt to "shut it up" by :
errorlevel -302

/J

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, those warnings are absolute nonsense. Why anything in bank 0 is safer than any other bank for that matter? Was there no need to "ensure" if I was accessing something from bank 0? Bah, no way!! Lost hundreds of hours to that. Terribly, awfully inept platform!

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

svofski wrote:
Terribly, awfully inept platform!

I've used PIC micros in several commercial products over the years. In fact I used to be a registered consultant for MicroChip.

One forgets just how incredibly old the PIC archetecture is! PIC stands for "Peripheral Interface Controller" and was intended as a small function block allowsing peripherals to be integrated into board designs. Originally (If I remember correctly) it was an NMOS part!

It wasn't that long ago that PICs were considered screamers! I remember other designers being envious of the MIPS rating at low cost.

Clunkyness like bank switching and weird table lookup mechanisms were considered par for the course for small highly-integrated uCs at that time.

Today I'd use an AVR over a PIC in most situations. All of the clunkyness has been shed from the AVRs. In fact, the AVR platform delivers all the benefits of high intergration while not sacrificing the benefits of a full scale microprocessor (Like a Z80 or Motorola equivelant). I've shelved my PIC development tool chain.

DFR

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok. I still have a makeshift PIC programmer (actually repaired it today). I decided to put one 16f676 in my power supply, I'll let it handle the standby button and listen to remote control (I wrote the code for RC5 long time ago). It will make me even with PIC platform.

Actually what made me angry at PICs are their larger devices. They simply are wrong thanks to the mentioned bank switching and paged addressing even for the program memory. Smaller and much simplier 14- and 16-pin PIC's are ok in my book.

P.S. I know how old PIC's are and that they did many good things in the past. Well, actually PICs brought me into the world of microcontrollers and I'm grateful. I maybe need to put more smilies in my messages, because some of my statements probably sound too cold to readers?

The Dark Boxes are coming.