PDA

View Full Version : Interfacing 16F88 to RF module



scomi85
- 19th February 2009, 06:59
To asm experts:

To be honest i am a real beginner in asm programming. I hope i can learn from you guys along my period of my project implementation.
OK, I am doing a project on meter reading. A PIC takes current and voltage and make calculations to get the power, watt. Then this data will be displayed to a 16x2 LCD. So until now this step is done. The problem now is, this data I will need to get it over a RF module. This RF module will take this value, transmit wirelessly to the receiver, and ends up at Hyper Terminal on the PC via USB connection.

Here, I have several questions regarding the asm code:
A. By refering to the attachment, I need to know which of the port is the one sending data to the LCD. (As I know there are also controlling bytes to the LCD.) Because if I get lets say RA4 as the one transmitting data, i can use this pin sending data using UART routine to the input of my RF module. If there are 2 pins from the PIC that is sending data, then i might need advice from asm experts how to get it transmitting over the input of my RF module.

I really needs urgent help here and I really really appreciate for your help.
Thanks again.

[My ASM code] (http://www.geocities.com/evios_wilber/wattmeter.asm)
[LCD include file] (http://www.geocities.com/evios_wilber/lcd.asm)
[Schematic] (http://farm4.static.flickr.com/3259/3218463472_c759712698_b.jpg)

scomi85
- 19th February 2009, 08:19
Well, i found a part here:



; Display Watts on LCD
;
Show_Watts:
mov16 Watts,Number
call bin2dec
call ShowDec1 ; display "xxxx.x"
movlw 'W'
call Print_Char ; display 'W'
movlw ' '
call Print_Char
return

;--------------------------------------------------------------------

If this is the case, can i add UART routine here so that i can set the baud rate over the RF input?

mister_e
- 19th February 2009, 12:52
Yes you can.