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.

Please could you help me

Status
Not open for further replies.
Hi Logan,

Give your dad our best wishes! Hope he gets better soon!

The interrupts in the code are not needed, but they don't do anything, just Microchip base code!

One thing I will mention,

The code uses a 20MHz clock, Proteus needs a fairly hefty processor to simulate that clock speed, I have a dual core (Core 2 Duo) 2.33 running on my laptop with XP Media Center (XP Pro basically) and 2GB ram.

I would suggest unless you have something similar to down clock.

This would involve changing the timings in the code for the delays.

Hope this helps

Wilksey.
 
thanks wilksey i am using dads laptop it has duo core and 4 GB ram with windows 7 but i will try it a bit slower i will say hi to my dad for you tommorow
 
Ah, Windows 7 might cause problems, especially 64 bit versions!

Can you post a screenshot of the laptop screen and what it is doing?

Regards

Wilksey
 
i am downloading something to take a pic of the screen but we have a very slow internet i have tried all the baud?? settings on the proteus terminal i might be better trying to make it on the bread board tommorow and adding a lcd so i can see whats going on

thank you logan
 
this is my screen shot
10971-proteus shot.png
 
Hi Logan,

That is very odd! I can only think it is something to do with the operating system, do you have any other terminal type PIC application you can run?
I.E. something that runs at 20 MHz and accesses the UART at 9600 baud? As I say you can always try reducing the speed of the app.

My terminal settings are 9600, N, 8, 1

Which is 9600 baud, no parity, 8 data bits, 1 stop bit.

The DS18X2X datasheet suggests you pull the DQ (RB2) line up high, dont know if you have done this as the terminal is in the way.

Regards

Wilksey
 
hello be80be i have tried all the different baud settings in the program and there different combunations with proteus and still getting rubish on the screen :( i will keep trying and let you know how it goes
 
Logan,

Try a simple app where the RX gets put into TX on the uart, set it up for 9600 at 20MHZ and try and run that on the SIM. Just to echo the characters typed back out.

Use a chip that you ideally have already in prototype form, i'm sure you or your dad has a dev board floating around with a 232 interface on?

If it doesn't work in proteus then try it on the real hardware, and you will see if it is the sim or not.

Wilksey
 
Last edited:
thanks wilksey i will give it a try and let you know we will get it running but first some pain well thats what dad says besides your all smart on here
logan
 
hello one the things i have noticed is there is a file called onewire.c in the mplab project but i cant see a #include <onewire.c> in any of the other files does this matter?
 
small update i got the terminal working in proteus i had to get rid of all the stuff i put in the program for 18f4865 chip and its oscillator i have asked mum to get me some max232 chips as i cant some in workshop but at least some of the proteus is working so i can at least try adding lcd for now
thanks for the help you are all being a big help
logan
ps i droped the soldering iron on my bedroom carpet and its burnt it i am not ment to solder up there so any ideas on a excuse i can use
 
ps i droped the soldering iron on my bedroom carpet and its burnt it i am not ment to solder up there so any ideas on a excuse i can use

Don't try an excuse. Just be up-front about it and accept any telling off you may get.
Trying to cover up any wrong-doing, by telling porkies, usually ends up in a worse punishment if/when the truth is eventually revealed.
You guys have far greater things to worry about at the moment, so if you were just trying to move the project along, explain so and apologise, then carry on soldering where you are supposed to.
 
I think you can transmit from PIC to PC without a level shift, but not send from PC to PIC, so as long as you dont try and send data back to the chip you should be ok.

You should be careful with soldering irons! They get extremely hot!!
 
It is going to be obvious what it was.. I mean, what else would you have that would be hot enough to melt/burn the carpet?

You could cause a bunch of trouble when your mom looks for the cause of the "mystery burn" because she doesn't want you to get burned by the "fake" source.

It is good that you are so interested in learning and building that you are "breaking the rules" for education. Most people are stupid and break their parents rules by smoking cigarettes and stuff with NO educational meaning.

I think you will be forgiven. She will understand.

You will get yelled at and told where to solder.

Use a solderless breadboard where you cant solder.

You dont want to forget to turn the iron off or accidentally drop it on paper and burn the house down. BE CAREFUL. Safety is THE most important thing in electronics. If you are not safe, you will hurt yourself or others.

Be careful and have fun. Your mom will understand... Just dont fib or lie. ;) You'll be fine!
 
Mum wasnt too bad about it! i have some stuff coming tuesday so i can bread board out the circuit wich i hope will make it easier to work on
 
I have almost got the temperature displaying properly, just waiting for someone to reply to get the negatives then it should be "ready".

Will keep you updated, i'm sure someone can figure it out.

Wilksey
 
THANKS Wilksey!! sorry i not been on but my dad has woken up and i been spending time at the hospital but i have been doing the project as well we dont actualy need neg tempreture for our project but i guess its good to have mum managed to get dad a digital scope for christmas at last we saw it on ebay but not sure if its any good for using with pics we got it cos it was cheap and we dont have any money (i do i got loads of christmas money! £30) maybe someone could look at the link and tell us if its a ok scope
**broken link removed** again thanks Wilksey deffo rep for this :D
 
That will be plenty fast enough for the things you are doing.
Did I attach the code to any of my posts? I cant remember!

I personally have a 200MHZ Tektronix scope 4 channel with USB recorder (£1500) and also I have used a BitScope which is quite good.

They are a really useful tool, essential for most things timing related in fact!

Wilksey
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top