1 Attachment(s)
need help in displaying data send by PC s/w controlling radio scanner.
Hi all,
I want to view data on 2X16 LCD coming from PC serial port, which controlls the Icom radio scanner R-10.
A PC programme called 'Unitrunker' decodes trunking data coming from FIRST radio and sends data to SECOND reciever (R-10) via serial port to follow the different channels ie it gives instruction to radio to tune to different frequencies to follow hopping frequencies.
Data is send in specific format. Please see the attatchment for the data format.This Data is exchanged between radio and PC. I want to see this data on LCD which is send to the second radio. I am especially interested in extracting information which in BCD format which actually gives radio information about the frequency.
I also want PIC to acknowledge back to PC in a specific format given in attatchment.
Can anybody help me in getting started. I intend to use pic16f828 or pic16f72.
Any help would be very much appreciated.
thanks in advance.
vu2iia
www.vu2iia.blogspot.com
Still cant figure out how to hserin data to LCD
Hi Henrik,
Sorry to bother u again, but I am still new to PBP. I cant figure out how to view data stored in array on LCD in the format given in attatchment.
Please help me, if this work I can use the BCD data to change the frequecies of Third radio I have got. Entire idea is to recycle old radios in to something usefull.
below is my code . Pls bear with my stupid code.
Can u pls explain why have u declared array (mystring var byte (16) of 16.
Right now display shows some constant number " 253" when I choose R-10 radio in the PC software. If I choose another radio it doesnt show anything ecept LCD OK, which I have put in the code to check display.
'************************************************* *****************
@ device pic16F628A, intrc_osc_noclkout
trisb = %00000001
trisA = %11110011
include "modedefs.bas"
' Define LCD registers and bits
Define LCD_DREG PORTB
Define LCD_DBIT 4
Define LCD_RSREG PORTA
Define LCD_RSBIT 0
Define LCD_EREG PORTA
Define LCD_EBIT 1
DEFINE LCD_LINES 4 'Define using a 2 line LCD
DEFINE LCD_COMMANDUS 2000 'Define delay time between sending LCD commands
DEFINE LCD_DATAUS 50 'Define delay time between data sent.
'define osc 4
'* hser setup
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
DEFINE HSER_SPBRG 25 ' FOR 20MHZ 129 = 2400, 32=9600,25 @ 4 for 2400
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
DEFINE HSER_BAUD 2400
cnt var byte
CMCON = 7 ' PORTA is digital
Pause 100 ' Wait for LCD to startup
r10data VAR BYTE[16]
lcdout $FE,1
LCDOUT "LCD OK"
PAUSE 200
clear
loop:
' CANT FIGURE OUT HOW TO EXTRACT NECESSARY BCD INFO FROM ARRAY
HSERIN WAIT($52,$E0), STR r10data\16\$FD]
'for cnt = 1 to 16
lcdout $FE,1
LCDOUT $fe,$80,dec r10data
'LCDOUT $fe,$c0+cnt," ",dec r10data [cnt]
'next cnt
PAUSE 10
GOTO LOOP
End
'************************************************* **************
hoping for some relpy from u, please help.
regards
vu2iia