I have made the functions below (I use a lot of defines that are in
the RF.h file):
void RfTx(char data)
{
RFSet(0);
UART1_TX(data);
}
char RfRx(void)
{
RFSet(1);
return(UART1_RX());
}
void RFSet(int mode)
{
switch(mode){
case 0:
//TX mode
IODIR0=RFModul;
IOSET0=RXSelect;
IOCLR0=TXSelect;
IOCLR0=CHSelect;
break;
case 1:
//RX mode
IODIR0=RFModul;
IOCLR0=RXSelect;
IOSET0=TXSelect;
IOCLR0=CHSelect;
break;
default:
break;
}
}
For now I have only testet the system one way. That means that I
have set one MCB to send and another to receive. By that I wouldn't
mean that it was necessary to have any delay after switching (as I
don't do that). I call the RfTx function from inside the while loop
in main of the transmitting MCB end RfRx from inside the while loop
of the receiving MCB. I Really can't see the why this is bothering
me so much.
--- In lpc2000@yahoogroups.com, "charlesgrenz" <charles.grenz@s...>
wrote:
>
> Ok that's good, but I did not see any controls for those in the
snipet
> of code you sent before. Is the TXD routine polled? Are you waiting
> until you finish sending the data from the TXD shift register
before
> switching the TXD enable off? If so, how are you doing this?
>
> Charles
>
> --- In lpc2000@yahoogroups.com, "unikum888" <xtreme@h...> wrote:
> >
> > Charles, sorry I misunderstood you completely :-)
> > I have the controlpins of the RXQ1 set by I/O pins on the
LPC2129. I
> > have made an RfRx and an RfTx function, that sets the RXQ1 and
> > either receive or send to the UART.
> > I/O pin settings on the LPC2129 are just made by IOSET and IOCLR.
> > I am sure that the RXQ1 modules are set right, because I have
> > measured and measued until my scopeprobe is almost worn down...
> >
> > --- In lpc2000@yahoogroups.com, "charlesgrenz"
<charles.grenz@s...>
> > wrote:
> > >
> > > Hi,
> > >
> > > No I meant the TXD and RXD enable of the RXQ1. Here is the
table
> > > from the manual.
> > >
> > > Operation Table
> > > Tx Select RX Select Function
> > > 0 0 Power Down Mode
> > > 0 1 Transmit Mode
> > > 1 0 Receive Mode
> > > 1 1 Power Down Mode
> > >
> > > You have to control the RXD and TXD of the RXQ1 inputs (Pins
16 and
> > > 16) similar to a RS485 communications to get it to recieve and
> > transmitt.
> > >
> > > regards,
> > > Charles
> > >
> > >
> > > --- In lpc2000@yahoogroups.com, "unikum888" <xtreme@h...>
wrote:
> > > >
> > > > Charles, I use the setup you will se below:
> > > >
> > > > /*******************INT UART*************************/
> > > >
> > > > void uart1_isr(void)__irq
> > > > {
> > > > if(U1IIR & 0x04){
> > > > LCD_Putchar(UART1_RX());
> > > > VICVectAddr = 0;
> > > > }
> > > > }
> > > >
> > > > /*******************INIT UART************************/
> > > >
> > > > void init_uart1(void) {
> >
> > > > VICVectAddr1 = (unsigned long) uart1_isr
> > > > VICVectCntl1 = 0x20 | 7;
> > > > VICIntEnable = 1 << 7;
> > > > PINSEL0 |= 0x00050000; //Enable RxD1 and TxD1
> > > > U1LCR = 0x83; //8 bits, no Parity, 1 Stop bit
> > > > U1DLL = 97; //9600 Baud Rate @ 15MHz VPB Clock
> > > > U1LCR = 0x03;
> > > > U1IER = 0x01;
> > > > }
> > > >
> > > > /********************WRITE UART*********************/
> > > >
> > > > void UART1_TX(char tx)
> > > > {
> > > > while (!(U1LSR & 0x20));
> > > > U1THR = tx;
> > > > }
> > > >
> > > > /********************READ UART*********************/
> > > >
> > > > char UART1_RX(void)
> >
> > > > {
> > > > while (!(U1LSR & 0x01));
> > > > return (U1RBR);
> > > > }
> > > >
> > > > --- In lpc2000@yahoogroups.com, "charlesgrenz"
> > <charles.grenz@s...>
> > > > wrote:
> > > > >
> > > > > How are you controlling the TXD and RXD enables?
> > > > >
> > > > > Charles
> > > > >
> > > > >
> > > > > --- In lpc2000@yahoogroups.com, "unikum888" <xtreme@h...>
> > wrote:
> > > > > >
> > > > > > Charles, I am using the FM-RXQ1 with MAX3222 between RF-
> > module
> > > > and
> > > > > > MCB2100 kit.
> > > > > >
> > > > > > --- In lpc2000@yahoogroups.com, "charlesgrenz"
> > > > <charles.grenz@s...>
> > > > > > wrote:
> > > > > > >
> > > > > > > Are you using the RF600T, TRXQ1 or FM-RXQ1? Also how
do
> > you
> > > > have it
> > > > > > > wired in if you are not using the RF600T?
> > > > > > >
> > > > > > > Charles
> > > > > > >
> > > > > > >
> > > > > > > --- In lpc2000@yahoogroups.com, "unikum888"
<xtreme@h...>
> > > > wrote:
> > > > > > > >
> > > > > > > > 9600Baud
> > > > > > > >
> > > > > > > > --- In lpc2000@yahoogroups.com, "charlesgrenz"
> > > > > > <charles.grenz@s...>
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > What's your baudrate set for on the Kiel units?
> > > > > > > > >
> > > > > > > > > Charles
> > > > > > > > >
> > > > > > > > > --- In lpc2000@yahoogroups.com, "unikum888"
> > <xtreme@h...>
> > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > uwe, I can send data from pc to MCB and the
other
> > way
> > > > around
> > > > > > > > without
> > > > > > > > > > problems. I have checked the connections some
100
> > > > times :-)
> > > > > > and
> > > > > > > > > > there should be no mistakes there.
> > > > > > > > > >
> > > > > > > > > > --- In lpc2000@yahoogroups.com, "Uwe Arends"
> > > > > > <Uwe_Arends@o...>
> > > > > > > > wrote:
> > > > > > > > > > > Kasper,
> > > > > > > > > > >
> > > > > > > > > > > > I have a strange problem. I have two MCB2100
> > boards
> > > > from
> > > > > > > > Keil
> > > > > > > > > > where
> > > > > > > > > > > > one is transmitting data out on the COM1 and
the
> > > > other
> > > > > > is
> > > > > > > > > > receiving
> > > > > > > > > > > > data on the COM1.
> > > > > > > > > > > > If i put a cable between them the receiver
part
> > > > writes
> > > > > > the
> > > > > > > > data
> > > > > > > > > > out
> > > > > > > > > > > > on the attached display very fine.
> > > > > > > > > > > >
> > > > > > > > > > > > I connect my wireless RXQ1(in transmit mode)
> > adapter
> > > > > > with
> > > > > > > > > > attached
> > > > > > > > > > > > RS232 converter to transmitting MCB2100 kits
> > COM1.
> > > > > > > > > > > >
> > > > > > > > > > > > In the other end I find out that the data is
> > > > received
> > > > > > fine
> > > > > > > > by
> > > > > > > > > > > > attaching the RXQ1(in receive mode) via an
RS232
> > > > > > converter
> > > > > > > > to at
> > > > > > > > > > PC
> > > > > > > > > > > > that runs Hyperterminal.
> > > > > > > > > > >
> > > > > > > > > > > Does sending from PC to the receiving MCB work
> > > > (connected
> > > > > > by
> > > > > > > > > > cable)?
> > > > > > > > > > > What might be happening is, that you have
outputs
> > > > driving
> > > > > > each
> > > > > > > > > > other.
> > > > > > > > > > > The PC has its RXD on pin 2, the MCB has it on
pin
> > 3
> > > > of
> > > > > > the
> > > > > > > > 9pin
> > > > > > > > > > > DSub.
> > > > > > > > > > >
> > > > > > > > > > > > I should now be able to attach the recieving
> > RXQ1
> > > > with
> > > > > > > > attached
> > > > > > > > > > > > RS232 converter to the MCB2100's COM1 and
write
> > > > received
> > > > > > > > data
> > > > > > > > > > out
> > > > > > > > > > > > onto the display.
> > > > > > > > > > > >
> > > > > > > > > > > > Well, whenever I do that the LPC2129 freezes
> > > > totally. I
> > > > > > have
> > > > > > > > to
> > > > > > > > > > > > unmount the RXQ1 and reset the whole MCB2100
kit
> > > > again.
> > > > > > > > > > >
> > > > > > > > > > > Well, why it would freeze totally is a mistery
in
> > the
> > > > > > scenario
> > > > > > > > of
> > > > > > > > > > > outputs driving each other, but maybe voltage
> > > > regulation
> > > > > > gets
> > > > > > > > > > upset?
> > > > > > > > > > > I don't recall the LPC's having a brownout
> > detector
> > > > that
> > > > > > would
> > > > > > > > > > handle
> > > > > > > > > > > this at the moment.
> > > > > > > > > > >
> > > > > > > > > > > Maybe this helps :o)
> > > > > > > > > > >
> > > > > > > > > > > -uweMessage
Re: LPC2129 + MAX563 + RXQ1(433MHz wireless)...
2005-04-18 by unikum888
Attachments
- No local attachments were found for this message.