help! How to i send data from one PIC16F690 to another PIC16F690

Status
Not open for further replies.

dandansmi

Newbie level 2
Joined
Jan 22, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,299
i am compleatly new to microcontolling, i am on an enginneering course studying micros. I am using a PIC16F690 with 4 LEDS, i am trying to write a simple program in mplab for a transmitter and reciver through a cable and batterys to power each board. i have a transmitter program where i have 1 LED flashing. I am trying to mimic that program on the reciver, but also if i plug in any other transmitter program the reciver will recognise it and mimic it.

i am using portA as an input and PORTC as an output.
i have had a go at writing a program but it may be compleatly wrong and make me look stupid. i will include it below. thank you soo much for all ur help i really need it.

#include <p16F690.inc>
__config (_INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_OFF & _MCLRE_OFF & _CP_OFF & _BOR_OFF & _IESO_OFF & _FCMEN_OFF)

cblock 0x20
endc

org 0
Start:
bsf STATUS,RP0 ; select Register Page 1
TRISA 0x00 ; Make PortA all input
TRISC 0x00 ; Make PortC all output
bcf STATUS,RP0 ; back to Register Page 0
MainLoop:
movlw PORTC ;moving output information in port C too W register
movwf 0x00 ;moving all LEDS in portc to F register
movf PORTA ;moving F register too port A
clrf 0X00 ;clearing portA ALL leds
movf PORTC ;moving portA back to port c
goto MainLoop ;repeat
end
 

thanks nikhilele just trying to learn now, would any body help me to get an assemberler code for this im using the pic kit 2 starter kit. many thanks
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…