Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Could someone compile a C program for me?

Status
Not open for further replies.

dr pepper

Well-Known Member
Most Helpful Member
I write code in .asm, however I need to compile a c program, I've been struggling to get it to compile.
If anyone has the time to compile it I'd be grateful.
The chip is a pic18f2550.
I'll pm or email the code if anyone kindly offers, the code is for a slot car racing system powerbase (from electric images website).
I just need a hex file to burn into the chip.
 
Last edited:
Thats great.
Yes the code is complete and has been complied and used by others.
PM sent, I would have posted the code here but its a little long for a thread.
 
No problem excellent.
Hope dinner went well.
I'll let you know if it works, I'm going to have a look at programming the device tomoz.
 
I'm having trouble getting the osc to start up.
I am however using a diferent chip, couldnt get the '2550, I'll have to just wait for one.
 
Sussed it, kind of, I get an output, my 'scope only see's the first part of the preamble code output, but its the right duration and freq so it looks as though its doing the trick.
I think I'll get the right chip for the job.
Next is to program some devices for the cars, I allready have the hex file for that though.
I've also started writing asm to do the same job, I'd like to devise a system where I can still have a decoder compatible with a standard system, but be able to have extra o/p's when used with mine, having a proper working system is usefull for prototyping.
 
I think so.
I'm waiting for a digital hand controller (pot) to arrive from ebay to test it proper, seems that theres more than just a pot inside, theres a couple of pushbuttons too, but the whole thing connects with just 2 wires.
 
Me too, I've been studying the scalextric ssd, and dcc they are similar, biggest difference with scalex is that they use an infra red led under the car for lane changing and lap timing.
I'm building a 'proper' powerbase controller (the code you compiled) as something to work with.
One of the drawbacks with scalex ssd is the lack of any auxilliary o/p's to control things like extra lights etc.
I'm wondering whether to dump the one way comms of the scalex system altogther and develop a system that can talk half duplex to and from the cars.
Variable magnatraction from coils in the cars instead of permanent magnets is also something I'd like to play with.
 
dr pepper: You are clearly familiar with electronics etc. but what was the problem for you not able to compile a C program?
 
dr pepper: You are clearly familiar with electronics etc. but what was the problem for you not able to compile a C program?
probably setting up mplab for using C etc etc. And maybe not knowing what compiler was used. I would have problems compiling ASM code, to be honest I wouldn't know where to start!

Keep the thread updated with the system, some kind of DCC system is something I am looking at for my train set, I dont want a commercial system tho.
 
I had a bad experince with C, tried to learn the code for pic's a few years back and had nothing but trouble with it, shy'd away ever since.
I do come accross C programs in industrial plc's, but I dont write the code only fault find.
 
probably setting up mplab for using C etc etc. And maybe not knowing what compiler was used. I would have problems compiling ASM code, to be honest I wouldn't know where to start!

Keep the thread updated with the system, some kind of DCC system is something I am looking at for my train set, I dont want a commercial system tho.

Maybe DP can make a Blog or something permanent, I think this would be a good project for someone. Especially if you scale it up to do duplex with the other add-ons.
 
I had a bad experince with C, tried to learn the code for pic's a few years back and had nothing but trouble with it
Sounds strange.. I imagine the problem must have been with the tools, not the language. If you try to rush your learning and cut corners, you will get trouble.
 
I think you were right first time, this was way back in the early 90's, and the software I was using was naff.
 
Unfortunately I'm hopeless with blogs.
I didnt know dcc could do duplex.
I'm wondering whether to stick with the original hornby slot car protocol, its rather clumsy, I'd rather do something with rs232, maybe switch a high freq carrier using the serial line.
 
Mr Rogers, yes it does work.
If only cars would stay on the track long enough.
 
Status
Not open for further replies.

Latest threads

Back
Top