Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 6th June 2007, 10:46 AM   (permalink)
Default PIC to PIC and output on LCD

Hi All,

Please i need your help to write this code:

I am using two PIC16F877A, 1 push buttom and 1 LCD 2*16.

the input of the first PIC is a push buttom,
the first PIC is connected to the second PIC using a Wire later on i will put a transmitter and receiver.

what i m trying to do is that when i press on the push buttom -> a sentence will be written on the LCD whihc is connected on the second PIC.

I need to write the code for the 2 PIC using PICbasic or assembly.

Please help me

Thanks in advcance
pouchito is offline   Reply With Quote
Old 6th June 2007, 11:15 AM   (permalink)
Default

Quote:
Originally Posted by pouchito
Hi All,

Please i need your help to write this code:

I am using two PIC16F877A, 1 push buttom and 1 LCD 2*16.

the input of the first PIC is a push buttom,
the first PIC is connected to the second PIC using a Wire later on i will put a transmitter and receiver.

what i m trying to do is that when i press on the push buttom -> a sentence will be written on the LCD whihc is connected on the second PIC.

I need to write the code for the 2 PIC using PICbasic or assembly.

Please help me

Thanks in advcance
Hi,
May I ask why you want to use to mid range PIC's, one to read a switch and the other to drive an LCD???

One 16F877A would do both jobs quite easily?

If you are using a TX/RX radio link, why not just TX the button push??
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now   Reply With Quote
Old 6th June 2007, 11:22 AM   (permalink)
Default

Quote:
Originally Posted by ericgibbs
Hi,
May I ask why you want to use to mid range PIC's, one to read a switch and the other to drive an LCD???

One 16F877A would do both jobs quite easily?
You need two (although you don't need 16F877's), because of the radio link.

Quote:

If you are using a TX/RX radio link, why not just TX the button push??
You need to encode the data transmission.

Everything he needs is covered in my tutorials, in assembler.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 6th June 2007, 11:40 AM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
You need two (although you don't need 16F877's), because of the radio link.



You need to encode the data transmission.

Everything he needs is covered in my tutorials, in assembler.
I was just thinking in terms of simple TX burst when the button was pushed, no data encoding,
likewise at the RX just detect the burst output from the receiver.


EDIT; Unless he wants to TX 'different' messages, he dosn't say, yet.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 6th June 2007 at 11:43 AM.
ericgibbs is online now   Reply With Quote
Old 6th June 2007, 11:55 AM   (permalink)
Default

Thanks for your help,

I don't mind if i used other than the PIC16F877
but i must use two because i don't have only the push button , this is only a part of my project.

I will check nigel's tutorial, but can you help me to start writing the code pls ?
pouchito is offline   Reply With Quote
Old 6th June 2007, 12:07 PM   (permalink)
Default

Quote:
Originally Posted by ericgibbs
I was just thinking in terms of simple TX burst when the button was pushed, no data encoding,
likewise at the RX just detect the burst output from the receiver.


EDIT; Unless he wants to TX 'different' messages, he dosn't say, yet.
You can't just send a burst of carrier - the receiver would be triggered by any click or pop in the atmosphere - data encoding is absolutely essential.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 6th June 2007, 12:14 PM   (permalink)
Default

Quote:
Originally Posted by pouchito
Thanks for your help,

I don't mind if i used other than the PIC16F877
but i must use two because i don't have only the push button , this is only a part of my project.

I will check nigel's tutorial, but can you help me to start writing the code pls ?
hi,
In your first post you said 16F877A and this post 16F877 ??

If you download Nigel's tutorials, I dont think he would mind if you used them
as a learning template, then 'cut/paste' code fragments into your own listing.
There is no point in writing new code when existing proven subroutines can be used.

Keep your code in a modular format, so that you can add tested subroutines.

Goto www.microchip.com and download the free MPLAB IDE V7.xx also get a 16F877? datasheet and application data for that PIC.
The MPLAB has templates for most of the PIC types, use a template as the
framework for your code.

If you attempt to write the code yourself and then post, members are more likely to help you sort it out.

Regards
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now   Reply With Quote
Old 6th June 2007, 12:14 PM   (permalink)
Default

I checked the tutorial 13 of Nigel's tutorial (EXCELLENT TUTORIAL )
I will compile the asm code right now TUT12-3T and TUT12-3R and simulate them

But need your help to interface an LCD cz it s a bit hard using the assembly as i see
pouchito is offline   Reply With Quote
Old 6th June 2007, 12:20 PM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
You can't just send a burst of carrier - the receiver would be triggered by any click or pop in the atmosphere - data encoding is absolutely essential.
hi Nigel,
When I said a 'burst' I was being over simplistic, I would make it a modulated 'burst' of some known duration.

It now appears that the OP has to use two PICs as part of the assignment.

I suspect he requires to transmit different text messages which bursts the burst bubble!
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now   Reply With Quote
Old 6th June 2007, 12:30 PM   (permalink)
Default

Please Nigel help me,
in the hardware part of your tutorial you have mentioned that the RA6 of the PIC in the transmitter part must be connected to the RA7 of the receiver part.

In the pic 16f628 the pin 15 is at the same time RA6 and osc2

if i used it i can't include any crystal oscillator !
am i right? pls correct me
pouchito is offline   Reply With Quote
Old 6th June 2007, 12:36 PM   (permalink)
Default

Quote:
Originally Posted by pouchito
Please Nigel help me,
in the hardware part of your tutorial you have mentioned that the RA6 of the PIC in the transmitter part must be connected to the RA7 of the receiver part.

In the pic 16f628 the pin 15 is at the same time RA6 and osc2

if i used it i can't include any crystal oscillator !
am i right? pls correct me
Just use a different pin, and alter the equates accordingly.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 6th June 2007, 12:57 PM   (permalink)
Default

Thanks again.

so if i omit the crystal and capacitor (of the closck), the circuit won't work right ?

FACING A PROBLEM, pls help:

I changed the portA.6 to PortA.0 and of course the receiver part also from 7 to 1, added the 4MHZ crystal and the capacitors but the simulation is not working :'(

What i have to modify to make it work ?

Last edited by pouchito; 6th June 2007 at 01:31 PM.
pouchito is offline   Reply With Quote
Old 6th June 2007, 01:23 PM   (permalink)
Default

Have you turned off the analogue inputs?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 6th June 2007, 10:31 PM   (permalink)
Default

no, because i don't know how to do it :S
pouchito is offline   Reply With Quote
Old 6th June 2007, 10:45 PM   (permalink)
Default

Quote:
Originally Posted by pouchito
no, because i don't know how to do it :S

I know I am gonna get shot down here....

PICBASIC is your friend. So much easier than assembler to learn...
I use Proton Plus, and love it..


SHAX
__________________
====
Shax.
====


A bus station is where a bus stops...
A train station is where a train stops...
On my desk I have a work station...
Nuff Sed!!!
Shax is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Help understanding the Unicorn Kyle-s4h Micro Controllers 2 5th June 2007 06:08 PM
PIC clock/4 output -- why ? tiny2 Micro Controllers 8 8th April 2007 07:06 PM
Using PicBasic with Output compare for sounds mduong77 Micro Controllers 7 29th March 2007 02:28 AM
PIC Project advice - doubling frequency coze Micro Controllers 8 26th February 2007 07:05 PM
Newcomers, please read! (PIC regarded) Upd. 0xD Jay.slovak Micro Controllers 0 17th April 2005 01:04 PM



All times are GMT. The time now is 10:35 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.