Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

rabbit-semi · Group for Rabbit C-programmable micros

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 6027
  • Category: Microcontrollers
  • Founded: Oct 3, 2000
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 4155 - 4184 of 41861   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#4155 From: "Raymond Parfett Exit 38" <raymondp@...>
Date: Fri Feb 1, 2002 4:43 am
Subject: Reserving XMEM in RAM
raymondparfett
Send Email Send Email
 
Hi

I am desperately short of root data space in my application, and I want to
remove the flash file system to free up code space so that I can move the
DATAORG to 5000H.  I am currently using fs2 to store my configuration data.

I want to use battery backed RAM to store my configuration data, as flash is
a little slow for my needs.

My questions are:

Is there any way of reserving a chunk of extended RAM in a way that it is in
the same location each boot, and getting its physical address for use with
root2xmem, xmem2root and xmem2xmem?

What guarantees are there of getting the same location in RAM by simply
calling xalloc in the same place every time before starting ucos2?

Thanks
Raymond Parfett

#4156 From: "Petr Cach" <petr_cach2@...>
Date: Fri Feb 1, 2002 8:28 am
Subject: Re: Again, uc/OS-II && DHCP == HELP
petr_cach
Send Email Send Email
 
The compiler message is:
line 1572 : ERROR BOOTP.LIB    : _dhcp_expired is out of scope/ not
declared.
line 1574 : ERROR BOOTP.LIB    : Assignment to read-only variable not
allowed.
line 1574 : ERROR BOOTP.LIB    : Invalid expression - need lvalue.
line 1574 : ERROR BOOTP.LIB    : _dhcp_expired is out of scope/ not
declared.
line 1578 : ERROR BOOTP.LIB    : _dhcp_prev_ip is out of scope/ not
declared.
line 1578 : ERROR BOOTP.LIB    : _dhcp_prev_ip is out of scope/ not
declared.

If I use dhcp_release() before dhcp_acquire(), would it be right?
Thank you for your help. Best regards
                 Petr Cach

>

#4157 From: tim murphy <tim@...>
Date: Fri Feb 1, 2002 8:53 am
Subject: Re: Re: Close port isn't closing the port..
tim@...
Send Email Send Email
 
Cool.
<I was looking for an example..> But appreciate the theory.
thanks
tim

On Fri, 1 Feb 2002, fisherman95616 wrote:

> Hi,
>
> Here's an example of how you can set the serial Port B transmit line
> low.
>
> // Initialize bits PC4 and PC5 (serial Port B) as normal I/O
> WrPortI(PCFR, &PCFRShadow, (PCFRShadow & ~0x10));
>
> // Set bit PC4 low
> WrPortI(PCDR, &PCDRShadow, (PCDRShadow & ~0x10));
>
>
> EK
>
>
> --- In rabbit-semi@y..., tim murphy <tim@q...> wrote:
> > Hi Kent,
> >
> > Thanks for the reply.. I don't know what you mean though.. I
> haven't configured the port to do anything special,
> > what is "normal use" in PCFR? How can I set the output low?
> >
> > thanks
> > tim
> >
> > ----
> > I would guess the port is still set up for serial use.
> > If you set the port to "normal use" in PCFR and set your output
> low,
> > your device should turn off.
> > Kent
> >
> >
> > > I have a device pulling some power off of the B serial port.
> > > It stays off until I open the port with serBopen(57600)
> > > Then when I close it with serBclose, the port is still open (my
> device is
> > > still on). When I restart the program, and the port is closed,
> the device
> > > is off again.
> > >
> > > serBclose(I REALLYMEANIT) :)
> > > thanks
> > >
> > >
> > >
> > >                        Yahoo! Groups Sponsor
> > >
> > >                                  []
> > >
> > >
> > >
> > >
> > >
> > >
> > > To unsubscribe from this group, send an email to:
> > > rabbit-semi-unsubscribe@e...
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
> >
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > rabbit-semi-unsubscribe@e...
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
> To unsubscribe from this group, send an email to:
> rabbit-semi-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

#4158 From: "pplegrub" <pplegrub@...>
Date: Fri Feb 1, 2002 11:05 am
Subject: floating point multiply error
pplegrub
Send Email Send Email
 
Hi All,

Why does the floating point multiply give incorrect results, and what
is the solution. Below are results of a simple test , multiplying a
float by 100.00 - I'm lost.

unsigned long Lnum;
float Fnum;

main()
{
   float x;
   char buf[20];

  for(x=40; x<50; x++) {
   sprintf(buf,"%.2f",5000 + (float)(x/100.00));
   Fnum = atof(buf);
   printf("(buf)%s - (atof)%.2f - %f\n", buf, Fnum, Fnum * 100.00);
  }
}

RESULT:
(buf)5000.40 - (atof)5000.40,
500039.97
(buf)5000.41 - (atof)5000.41,
500040.97
(buf)5000.42 - (atof)5000.42,
500042.03
(buf)5000.43 - (atof)5000.43,
500043.03
(buf)5000.44 - (atof)5000.44,
500043.97
(buf)5000.45 - (atof)5000.45,
500044.97
(buf)5000.46 - (atof)5000.46,
500046.03
(buf)5000.47 - (atof)5000.47,
500047.03
(buf)5000.48 - (atof)5000.48,
500047.97
(buf)5000.49 - (atof)5000.49, 500048.97

#4159 From: "David Emrich" <dav_ucc@...>
Date: Fri Feb 1, 2002 11:30 am
Subject: Re: Is the MC6875P3 obsolete ?
dave_emrich
Send Email Send Email
 
>Hi Folks,
>
>I know this is the wrong forum, but I'm hoping to draw on the collective
>expertise of the group :)
>In short, I've spent ages with search engines and can't find anything, not
>even a decent newsgroup
>to ask.
>
>I think I recall that the Motorola 68705P3 was obsoleted quite a few years
>ago.
>Could someone please confirm this for me ?

Yep, can't tell you when they did, but Moto obsoleted the (non-HC) '05
series a while back.

The hc05 seems to be alive and well though (automotive markets tend to do
that to old devices!). But I'm beat if I can figure out a way to determine
what HC705xxx part would be the most suitable candidate to replace the P3. I
guess you've tried asking motorola directly for their recommendation for the
closest match?

You ought to be able to use the same hex code (with possibly only a MOR
register change / addition) with little effort though, as long as the
replacement micro has the same style of IO at the same place.


>Does anyone know if any of the HC stuff might be usable in an existing
>product ( field repairs -
>preferably using the same HEX file ) with a suitable daughter card ?

As to the daughter board, it depends entirely on what hardware's connected
to the existing P3's as to whether it's pin-for-pin compatible or requires
level/timing conversions.

David.



_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

#4160 From: "David Emrich" <dav_ucc@...>
Date: Fri Feb 1, 2002 11:31 am
Subject: Re: Is the MC6875P3 obsolete ?
dave_emrich
Send Email Send Email
 
>Hi Folks,
>
>I know this is the wrong forum, but I'm hoping to draw on the collective
>expertise of the group :)
>In short, I've spent ages with search engines and can't find anything, not
>even a decent newsgroup
>to ask.
>
>I think I recall that the Motorola 68705P3 was obsoleted quite a few years
>ago.
>Could someone please confirm this for me ?

Yep, can't tell you when they did, but Moto obsoleted the (non-HC) '05
series a while back.

The hc05 seems to be alive and well though (automotive markets tend to do
that to old devices!). But I'm beat if I can figure out a way to determine
what HC705xxx part would be the most suitable candidate to replace the P3. I
guess you've tried asking motorola directly for their recommendation for the
closest match?

You ought to be able to use the same hex code (with possibly only a MOR
register change / addition) with little effort though, as long as the
replacement micro has the same style of IO at the same place.


>Does anyone know if any of the HC stuff might be usable in an existing
>product ( field repairs -
>preferably using the same HEX file ) with a suitable daughter card ?

As to the daughter board, it depends entirely on what hardware's connected
to the existing P3's as to whether it's pin-for-pin compatible or requires
level/timing conversions.

BTW: I have a small supply of second hand 68705R3S's which I might be
convinced to part with to a worthy cause. They're not P3's, but they ARE
windowed, and they ARE the same process as the P3's.

Regards,
David.



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

#4161 From: "Michel GOUGET" <mgouget@...>
Date: Fri Feb 1, 2002 12:06 pm
Subject: Input capture chips ?
mgouget1
Send Email Send Email
 
Hello,
 
For interfacing my BL card with a RC receiver and accelerometers which provide a PWM signal (pulses from 1 to 2 ms), I need a *very* precise (ie. 5us at least)  way of getting pulse length. I already did that with the Input Capture of the 68HC11 and it works great. I understand that it is possible to do that for a *single* input by connecting to INTA with limited precision (ie. 20 us) . Unfortunately, I need 3 channels and better precision.
 
Do you know of a chip providing extra input captures, interfacing preferably through I2C or SPI ?
 
Thanks in advance.
 
Michel

#4162 From: "Bjarne Nielsen" <bnielsen@...>
Date: Fri Feb 1, 2002 12:23 pm
Subject: Re: floating point multiply error
bjarnenielsendk
Send Email Send Email
 
This is a general problem, and has nothing to do with the Rabbit. I also use MS Visual C++ as a programming language, and it has the same problem, even though it has a resolution of  AFAIR 19 digits!
The source to the problem is in the way floating points are represented in binary format. No matter how hard you try, can can never get 100% accuracy, although more digits help.
 
If your problem is comparing two fp values, you can specify a minimum difference. If the difference between two numbers are less than your minimum difference, you can accept the numbers to be equal.
If it is a matter of representation, I'm not sure there's much you can do about it, unless you want to make a higher resolution fp library.
 
Cheers
Bjarne Nielsen
----- Original Message -----
From: pplegrub
Sent: Friday, February 01, 2002 12:05 PM
Subject: [rabbit-semi] floating point multiply error

Hi All,

Why does the floating point multiply give incorrect results, and what
is the solution. Below are results of a simple test , multiplying a
float by 100.00 - I'm lost.

unsigned long Lnum;
float Fnum;

main()
{
  float x;
  char buf[20];
 
 for(x=40; x<50; x++) {
  sprintf(buf,"%.2f",5000 + (float)(x/100.00));
  Fnum = atof(buf);
  printf("(buf)%s - (atof)%.2f - %f\n", buf, Fnum, Fnum * 100.00);
 }
}

RESULT:
(buf)5000.40 - (atof)5000.40,
500039.97                                        
(buf)5000.41 - (atof)5000.41,
500040.97                                        
(buf)5000.42 - (atof)5000.42,
500042.03                                        
(buf)5000.43 - (atof)5000.43,
500043.03                                        
(buf)5000.44 - (atof)5000.44,
500043.97                                        
(buf)5000.45 - (atof)5000.45,
500044.97                                        
(buf)5000.46 - (atof)5000.46,
500046.03                                        
(buf)5000.47 - (atof)5000.47,
500047.03                                        
(buf)5000.48 - (atof)5000.48,
500047.97                                        
(buf)5000.49 - (atof)5000.49, 500048.97


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sponsored by VeriSign - The Value of Trust
When building an e-commerce site, you want to start with a
secure foundation. Learn how with VeriSign's FREE Guide.
http://us.click.yahoo.com/oCuuSA/XdiDAA/yigFAA/dN_tlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
rabbit-semi-unsubscribe@egroups.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



#4163 From: "pplegrub" <pplegrub@...>
Date: Fri Feb 1, 2002 12:36 pm
Subject: Re: floating point multiply error
pplegrub
Send Email Send Email
 
Thanks Bjarne,

I appreciate the problem, however I need to send data to a device
that requires the value in an unsigned long int, therefore after
calculations have been done, the value has to be multiplied by 100.
The device has a configuration command which enables or disables the
integer or decimal point format of the number.

I have tried the following and it seems to work upto certain amounts
Ltemp = (unsigned long int)((atof(p) * 100.00)+0.5);

I was just hoping that someone had some advice on this..

regards

rob

--- In rabbit-semi@y..., "Bjarne Nielsen" <bnielsen@p...> wrote:
> This is a general problem, and has nothing to do with the Rabbit. I
also use MS Visual C++ as a programming language, and it has the same
problem, even though it has a resolution of  AFAIR 19 digits!
> The source to the problem is in the way floating points are
represented in binary format. No matter how hard you try, can can
never get 100% accuracy, although more digits help.
>
> If your problem is comparing two fp values, you can specify a
minimum difference. If the difference between two numbers are less
than your minimum difference, you can accept the numbers to be equal.
> If it is a matter of representation, I'm not sure there's much you
can do about it, unless you want to make a higher resolution fp
library.
>
> Cheers
> Bjarne Nielsen
>
>   ----- Original Message -----
>   From: pplegrub
>   To: rabbit-semi@y...
>   Sent: Friday, February 01, 2002 12:05 PM
>   Subject: [rabbit-semi] floating point multiply error
>
>
>   Hi All,
>
>   Why does the floating point multiply give incorrect results, and
what
>   is the solution. Below are results of a simple test , multiplying
a
>   float by 100.00 - I'm lost.
>
>   unsigned long Lnum;
>   float Fnum;
>
>   main()
>   {
>     float x;
>     char buf[20];
>
>    for(x=40; x<50; x++) {
>     sprintf(buf,"%.2f",5000 + (float)(x/100.00));
>     Fnum = atof(buf);
>     printf("(buf)%s - (atof)%.2f - %f\n", buf, Fnum, Fnum * 100.00);
>    }
>   }
>
>   RESULT:
>   (buf)5000.40 - (atof)5000.40,
>   500039.97
>   (buf)5000.41 - (atof)5000.41,
>   500040.97
>   (buf)5000.42 - (atof)5000.42,
>   500042.03
>   (buf)5000.43 - (atof)5000.43,
>   500043.03
>   (buf)5000.44 - (atof)5000.44,
>   500043.97
>   (buf)5000.45 - (atof)5000.45,
>   500044.97
>   (buf)5000.46 - (atof)5000.46,
>   500046.03
>   (buf)5000.47 - (atof)5000.47,
>   500047.03
>   (buf)5000.48 - (atof)5000.48,
>   500047.97
>   (buf)5000.49 - (atof)5000.49, 500048.97
>
>
>
>   To unsubscribe from this group, send an email to:
>   rabbit-semi-unsubscribe@e...
>
>
>
>   Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/

#4164 From: "Husband, David" <david.husband@...>
Date: Fri Feb 1, 2002 12:45 pm
Subject: RE: floating point multiply error
old_shagger
Send Email Send Email
 
Which is precisely why binary fixed-point maths is used.

-----Original Message-----
From: Bjarne Nielsen [mailto:bnielsen@...]
Sent: Friday, February 01, 2002 12:23 PM
To: rabbit-semi@yahoogroups.com
Subject: Re: [rabbit-semi] floating point multiply error


This is a general problem, and has nothing to do with the Rabbit. I also use
MS Visual C++ as a programming language, and it has the same problem, even
though it has a resolution of  AFAIR 19 digits!
The source to the problem is in the way floating points are represented in
binary format. No matter how hard you try, can can never get 100% accuracy,
although more digits help.

If your problem is comparing two fp values, you can specify a minimum
difference. If the difference between two numbers are less than your minimum
difference, you can accept the numbers to be equal.
If it is a matter of representation, I'm not sure there's much you can do
about it, unless you want to make a higher resolution fp library.

Cheers
Bjarne Nielsen






**********************************************************************
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system.
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone.
Thank you for your co-operation.
**********************************************************************

#4165 From: "rvsmoore" <rvsmoore@...>
Date: Fri Feb 1, 2002 1:18 pm
Subject: Re: TCP/IP over SLIP
rvsmoore
Send Email Send Email
 
Hi,
May be off topic already, but why don't you use the ppp.lib?
I'm using it and it works fine for some isp's. And also for
tcpip, may be you can use it as a source to solve your problem?
Ron
--- In rabbit-semi@y..., "alejandroi000" <alejandroi@s...> wrote:
> Hello,
>
> I need help making TCP/IP work over a Serial Port using SLIP. I
have
> made the SLIP library but don't know how to atach it to the TCP/IP
> stack. Any help is welcome.
>
> Thanks

#4166 From: "Gary L. Coakley" <coakley@...>
Date: Fri Feb 1, 2002 1:26 pm
Subject: BL1810 and analog input
glcoakley
Send Email Send Email
 
Hi, group.
 
I have an older Jackrabbit dev. board/kit and I just now have a need to do analog input.
 
using the following code

    jrioInit();
 
    for ( i = 0; i < TSIZE; i++ )
    {
        anaIn(0, &value);
        while ( value < 0 )
            anaIn(0, &value);
        values[i] = value;
    }
 
I get consistent values of about 128 for the input.
 
Using the table provided in the manual and referenced online at http://www.zworld.com/support/documentation/documents/BL1800/Gsman/4soft.htm#940278
 
I interpret  the value 128 to be about 0.495 volts.
 
one problem - the signal meters out at 0.125 volts. And I checked it with a 'scope just to make sure my old analog multimeter wasn't on the fritz - the 'scope said the same.
 
A) Am I doing anything obviously suspect?
B) If not, is this normal and I should just calibrate in about 0.37 volt offset?
 
Thanks,
Gary
 
 

#4167 From: "kevin_hendry" <khendry@...>
Date: Fri Feb 1, 2002 3:14 pm
Subject: Trying to use PC6 as an output...
kevin_hendry
Send Email Send Email
 
We are trying to use PC6 as an output. All that we are looking for a
is fairly rappid pulse from that pin on a BL1800 board.

We are aware that this is the pin used as Tx for the programming
cable.  We disable the feature should the cable be attached.

Is there some kind of special initialization needed in order to get
the pin to pulse out.

Here is a code snippet of what we are doing.
	 costate
	 {
		 BitWrPortI(PCDR, &PCDRShadow, 1, 6);
		 if (!BitRdPortI(PCDR, 7))
		 {
			 // Whatever...
		 }
		 waitfor(IntervalMs (200));
		 BitWrPortI(PCDR, &PCDRShadow, 0, 6);
		 waitfor(IntervalMs (100));
	 }
There is no init code for this port, and none required that I know
of. Do we have to use it as a serial comms port, or can we use it
just as an output like above?

Any help would be nice.
Thanks
K.

#4168 From: "kevin_hendry" <khendry@...>
Date: Fri Feb 1, 2002 3:25 pm
Subject: Re: BL1810 and analog input
kevin_hendry
Send Email Send Email
 
I have seen a number of issues with the ADC on the BL18xx boards.
It may have to do with how you are inputing the Analog signal.  If
you require a large input impedance, R31 must be removed otherwise
the boards input impedance has supposedly been setup for a popular
thermocouple (according to the docs)

The other option that has been suggested to me by members of this
group is to use externa ADC. The implementation on the BL18xx boards
is cheap, buggy, and poor resolution.

Hope this helps.
K.

--- In rabbit-semi@y..., "Gary L. Coakley" <coakley@u...> wrote:
> Hi, group.
>
> I have an older Jackrabbit dev. board/kit and I just now have a
need to do analog input.
>
> using the following code
>
>     jrioInit();
>
>     for ( i = 0; i < TSIZE; i++ )
>     {
>         anaIn(0, &value);
>         while ( value < 0 )
>             anaIn(0, &value);
>         values[i] = value;
>     }
>
> I get consistent values of about 128 for the input.
>
> Using the table provided in the manual and referenced online at
http://www.zworld.com/support/documentation/documents/BL1800/Gsman/4so
ft.htm#940278
>
> I interpret  the value 128 to be about 0.495 volts.
>
> one problem - the signal meters out at 0.125 volts. And I checked
it with a 'scope just to make sure my old analog multimeter wasn't on
the fritz - the 'scope said the same.
>
> A) Am I doing anything obviously suspect?
> B) If not, is this normal and I should just calibrate in about 0.37
volt offset?
>
> Thanks,
> Gary

#4169 From: "monte_dalrymple" <monted@...>
Date: Fri Feb 1, 2002 3:48 pm
Subject: Re: need help !!!!! cuz serial timer is not an output pin to be used !!!
monte_dalrymple
Send Email Send Email
 
The sampling clock is not available in async mode. The serial
clock is automatically output on one of the Port B pins when
using an internal clock in clocked serial mode. If you are
willing to give up a serial port, it is possible to output a
continuous pulse train on the Port B pin, at the bit-rate you
have programmed for the clocked-serial mode. You do this by
issuing a "Tx Trigger" command in the Serial Port Control
Register WITHOUT loading a byte to the transmit buffer. Because
there is no data to send, the transmitter continuously sends
the serial clock to the Port B output. You can then stop this
output by writing a byte to the transmit buffer, and the pulses
will stop after the normal eight bit times. Obviously neither
the receiver or transmitter is available for use during this
mode of operation... I have used this technique to provide the
1.544MHz signal required by a u-law codec, and then used the
other clocked serial channel to read and write the data to the
codec.

Monte Dalrymple


--- In rabbit-semi@y..., "Kent Johansen" <kent@a...> wrote:
> The Rabbit has a kind of an uart inside, which takes care of
sampling the bits at the
> right time etc. The timing of the sampling starts at the negative
going edge of the
> start bit and is determined by PCLK/2, reduced by TIMERA1 and then
by the
> respective TIMERA4..7.
>
> When RX goes low, the rabbit will wait 1.5 bit times, then sample
bit 7,  wait 1 bit
> time, sample bit 6 etc.  The bits are usually sampled in the
middle.
>
> The 16x clock is not present at any stage in the process (except by
chance, if
> processor speed and baud rate matches).
> TIMERA1 counts to the value in the TAT1R register and divides in
this way with this
> number.
> Same with timer 4-7 and TATxR
>
> By using the ASYNC clock input you can determine yourself when the
bit has to be
> sampled. You will then send the sample clock into PB0 (PortB) or
PB1 (Port A).
> When transmitting, you can set SxCR up so you get the clock out on
the appropriate
> one of these pins.
>
> That is what the serial ports can do.
>
> Clocked serial mode may be used to sync to nearly any signal with a
few external
> chips.
>
> In your case, the IrDA just has to send a pulse 3/16 of a bit time
within one bit time.
> You can most likely use any clock running at 16x baud rate, because:
>
> If the phase of the 16x clock is as bad as it could be, i.e. 1/32
bit time off, all that
> would happen is that the transmission of the whole byte is offset
by 1/32 bit time.
> Since the receiver will start syncing on the flank of the start bit
(a 0 and therefore a
> pulse) it will never notice any problems. Since the 0-pulses start
1/2 bit time into the
> bit, 1/32 will never move them outside the bit's allocated time.
>
>
> Send 10..(etc)
>
> IrDA signal
> (startbit)                    (1)                          (0)
> ________~~~_____ ________________ ________~~~_____   etc.
> 8/16        3/16 5/16        16/16 low
(again)
>
> UART signal
>
> ________________~~~~~~~~~~~~~~~ _________________
>
>
> Hope this clarifies it
>
> Kent
>
> > hi ,Kent
> >
> > yes i agree with ya... aft i used this method, my
> > processor speed is in deep shit !!!! so slow..... and
> > i can't do other process....
> >
> > well then i found another solution, is just to used
> > another ext chip that can give me this 16xCLK to drive
> > this IrDA chip. but i'm so suprise that i can't used
> > the serial timer, which is not an output pin that i
> > can used for this 16xCLK (16xbaud rate) at first the
> > is some kind of UART inside there...
> >
> > but i'm wrong.... so wrong...
> > the serial timer is just using the interrupt, and by
> > using the TIMER_B or A is interrupt base.. which is
> > not real time.... is kinda of rabbit drawback, yet
> > advantage to support 4 serial port at the same
> > time.... perhaps i'm wrong.... yet not very familar
> > with this processor till now... ;)
> >
> > regards
> > yong
> >
> >
> > > You need to have a look at the GCSR register as
> > > well.
> > >
> > > If you are not using the watchdog, following should
> > > do:
> > >
> > > WrPortI(GCSR,&GCSRShadow,0);
> > > // proc=OSC/8 and PCLK=OSC/8
> > > WrPortI(G0CR,&G0CRShadow,((GOCRShadow&~0xc0)| 0x40))
> > > // CLK = PCLK/4
> > >
> > > But your processor now runs at 1/8 of max speed. I
> > > am sure you don't want that.
> > >
> > > I have programmed IrDA myself and I am aware of the
> > > system with the shorter
> > > (3/16) pulse for 0 and nothing for 1.
> > > I don't know if your chip need the 1/16 clock to be
> > > synchronized with the bit clock.
> > > Normally, IrDA chips use a 16x clock to generate the
> > > pulse for a "0",  which is 3/16
> > > long, starting 1/2 bit time into the serial bit.
> > > This timing is not overly critical, so you
> > > might get away with not synchronizing it.
> > >
> > > Why don't you leave GCSR so you get 8 times your
> > > desired clock rate out on CLK
> > > and use a 74HCxxx (I don't remember the xxx) counter
> > > chip to divide that frequency
> > > with 8 ? If you need to synchronize with the serial
> > > bit clock, you could reset the
> > > counter on negative going flanks of the serial port
> > > input or output.
> > > ( if the encode/decode chip needs/allows this. I am
> > > pretty sure it is not needed.)
> > >
> > > There are possibly easier ways. A 16C654 serial chip
> > > will encode and decode the
> > > IrDA bit patterns and you benefit from a 60 bytes
> > > buffer, which is very nice at IrDA
> > > speeds.
> > >
> > > Kent
> > >
> > >
> > > > hi kent,
> > > >
> > > > i think u got me wrong in some way.....
> > > > and i guess i did mention it wrongly as well....
> > > >
> > > > > > i need a clock signal to drive some
> > > encoder/decoder
> > > > > > chip with 16xCLK rate, which is 16 times of
> > > the serial
> > > > > > port baud rate.... ( freq = 1.843 MHZ )
> > > >
> > > > in fact i need the clock signal which is ( 16 x
> > > serial baud rate ) to
> > > > drive this IrDA encoder/decoder chip.... when
> > > TX/RX data via serial port.
> > > >
> > > > can u pls tell me exactly how to used the PCLK...
> > > to get this clock
> > > > rate ( freq = 1.843 MHZ ). i have try to used
> > > >
> > > > PCLK output driven with peripheral clock ÷ 2:
> > > > WrPortI(GOCR, &GOCRShadow, ((GOCRShadow&~0xc0)|
> > > 0x40)); and
> > > >
> > > > PCLK output on (high):
> > > > WrPortI(GOCR, &GOCRShadow, (GOCRShadow | 0xc0));
> > > >
> > > > so how can i ..........
> > > > > The PCLK is the clock driving the Rabbit. So
> > > dividing it by 8 and
> > > > > then by 2 would give you a 1.843MHz CLK that was
> > > half of the
> > > > > PCLK and your Rabbit would run 3.686MHz with a
> > > 29.488 MHz
> > > > > oscillator. Not fast enough to handle your data.
> > >
> > > > currently i'm using RCM2100 to do all this
> > > job......
> > > >
> > > > thnk lot
> > > >
> > > >
> > > > > That sounds like a tough task.
> > > > >
> > > > > It sounds like a chip that is meant for a signal
> > > processor chip. They
> > > > > usually require bits to be sent into the chip to
> > > program it at the
> > > > > same rate as they exit... Be sure that is not
> > > the case.
> > > > > I might need some more information to help you.
> > > > >
> > > > > 0xC0 will not give you PCLK/2, the two upper
> > > bits should be 01.
> > > > >
> > > > > The PCLK is the clock driving the Rabbit. So
> > > dividing it by 8 and
> > > > > then by 2 would give you a 1.843MHz CLK that was
> > > half of the
> > > > > PCLK and your Rabbit would run 3.686MHz with a
> > > 29.488 MHz
> > > > > oscillator. Not fast enough to handle your data.
> > >
> > > > >
> > > > > If you need exactly 16x the clock rate, you MAY
> > > be able to use the
> > > > > serial clocks in async mode with some assembler
> > > programming. It
> > > > > is fast, though, and you may need to disable the
> > > internal RS232
> > > > > drivers.
> > > > > I would suggest you generate the clock with some
> > > external circuitry,
> > > > > divide by 16 and use that signal to clock the
> > > bits into the serial
> > > > port.
> > > > >
> > > > > If it involves a sigma-delta AD you might find
> > > that there is way too
> > > > > little time to drive it directly.
> > > > >
> > > > > Good luck
> > > > > Kent Johansen
> > > > >
> > > > > > hi all the great person over here !!!!
> > > > > > i really need help for this.....
> > > > > >
> > > > > > i need a clock signal to drive some
> > > encoder/decoder
> > > > > > chip with 16xCLK rate, which is 16 times of
> > > the serial
> > > > > > port baud rate.... ( freq = 1.843 MHZ )
> > > > > >
> > > > > > so is iz recomm to used the timer-B or the
> > > > > > pin PCLK - output (internal clock) ???
> > > > > >
> > > > > > if i used PCLK by,
> > > > > > PCLK output on (high):
> > > > > > WrPortI(GOCR, &GOCRShadow, (GOCRShadow |
> > > 0xc0));
> > > > > >
> > > > > > then when i tap the pin is should give me
> > > 1.843MHZ
> > > > > > clocking signal ready to be used ???
> > > > > >
> > > > > > or else what should i set the bits 7 and 6 of
> > > the
> > > > > > Global Output Register (GOCR) ????
> > > > > >
> > > > > > pls pls.........
> > > > > > and lot lot of thank for who giving some
> > > suggestion !!
> > > > > >
> > > > > >
> > > > > >
> > > __________________________________________________
> > > > > > Do You Yahoo!?
> > > > > > Great stuff seeking new owners in Yahoo!
> > > Auctions!
> > > > > > http://auctions.yahoo.com
> > > > > >
> > > > > > Yahoo! Groups Sponsor
> > > > > >
> > > > > > ADVERTISEMENT
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > To unsubscribe from this group, send an email
> > > to:
> > > > > > rabbit-semi-unsubscribe@e...
> > > > > >
> > > > > >
> > > > > >
> > > > > > Your use of Yahoo! Groups is subject to the
> > > Yahoo! Terms of Service.
> > > >
> > > >
> > > > To unsubscribe from this group, send an email to:
> > > > rabbit-semi-unsubscribe@e...
> > > >
> > > >
> > > >
> > > > Your use of Yahoo! Groups is subject to the Yahoo!
> > > Terms of Service.
> > >
> > >
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Great stuff seeking new owners in Yahoo! Auctions!
> > http://auctions.yahoo.com
> >
> >
> > To unsubscribe from this group, send an email to:
> > rabbit-semi-unsubscribe@e...
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >

#4170 From: "engrmanager" <dmatthews@...>
Date: Fri Feb 1, 2002 3:55 pm
Subject: Re: BL1810 and analog input
engrmanager
Send Email Send Email
 
Rather than use an external ADC, you might also want to consider one
of the BL20XX products.  Like the BL18XX boards they are based on the
Rabbit chip, but have a more traditional A/D front end.

DM

--- In rabbit-semi@y..., "kevin_hendry" <khendry@z...> wrote:
> I have seen a number of issues with the ADC on the BL18xx boards.
> It may have to do with how you are inputing the Analog signal.  If
> you require a large input impedance, R31 must be removed otherwise
> the boards input impedance has supposedly been setup for a popular
> thermocouple (according to the docs)
>
> The other option that has been suggested to me by members of this
> group is to use externa ADC. The implementation on the BL18xx
boards
> is cheap, buggy, and poor resolution.
>
> Hope this helps.
> K.
>
> --- In rabbit-semi@y..., "Gary L. Coakley" <coakley@u...> wrote:
> > Hi, group.
> >
> > I have an older Jackrabbit dev. board/kit and I just now have a
> need to do analog input.
> >
> > using the following code
> >
> >     jrioInit();
> >
> >     for ( i = 0; i < TSIZE; i++ )
> >     {
> >         anaIn(0, &value);
> >         while ( value < 0 )
> >             anaIn(0, &value);
> >         values[i] = value;
> >     }
> >
> > I get consistent values of about 128 for the input.
> >
> > Using the table provided in the manual and referenced online at
>
http://www.zworld.com/support/documentation/documents/BL1800/Gsman/4so
> ft.htm#940278
> >
> > I interpret  the value 128 to be about 0.495 volts.
> >
> > one problem - the signal meters out at 0.125 volts. And I checked
> it with a 'scope just to make sure my old analog multimeter wasn't
on
> the fritz - the 'scope said the same.
> >
> > A) Am I doing anything obviously suspect?
> > B) If not, is this normal and I should just calibrate in about
0.37
> volt offset?
> >
> > Thanks,
> > Gary

#4171 From: Joel Baumert <jbaumert@...>
Date: Fri Feb 1, 2002 4:20 pm
Subject: Re: floating point multiply error
jjbaumert
Send Email Send Email
 
I think you should remove the .2f's in the sprintf and printf because you
are throwing away valuable mantissa information about the floating point
number.

As to the values being in "error," I wrote the following program.  The
constant floats are calculated by Dynamic C using the PC's single precision
floating point. As you can see, we are right on for all of the
calculations, with the exception of the final calculation where we are off
by 1/2 bit in the mantissa.  This 1/2 bit comes from Dynamic C calculating
the rounding slightly differently rounding method from the PC and the PC
keeping a number of extra bits of precision between parts of the expression.

Joel


main()
{
          float f,g,h,i;

          const float f1=40/100.0;
          const float f2=5000;
          const float f3=5000+40/100.0;
          const float f4=(5000+40/100.0)*100.0;

          int x;
          float Fnum;
          char buf[30];

          printf("40/100.0=%f(%08lx)\n",f1,f1);
          printf("5000=%f(%08lx)\n",f2,f2);
          printf("5000+40/100.0=%f(%08lx)\n",f3,f3);
          printf("(5000+40/100.0)*100.0=%f(%08lx)\n\n",f4,f4);

          f=5000;
          g=40.0;
          g=g/100.0;
          h=f+g;
          i=h*100.0;

          printf("40/100.0=%f(%08lx)\n",g,g);
          printf("5000=%f(%08lx)\n",f,f);
          printf("5000+40/100.0=%f(%08lx)\n",h,h);
          printf("(5000+40/100.0)*100.0=%f(%08lx)\n\n",i,i);

          x=40;
          sprintf(buf,"%f",5000 + (float)(x/100.0));
          Fnum = atof(buf);
          printf("(buf)%s - (atof)%f(%08lx) - %f(%08lx)\n", buf, Fnum, Fnum,
Fnum*100.0, Fnum*100.0);

}

output:

40/100.0=0.400000(3ecccccd)

5000=5000.000000(459c4000)

5000+40/100.0=5000.399900(459c4333)

(5000+40/100.0)*100.0=500040.000000(48f42900)


40/100.0=0.400000(3ecccccd)

5000=5000.000000(459c4000)

5000+40/100.0=5000.399900(459c4333)

(5000+40/100.0)*100.0=500039.968000(48f428ff)


(buf)5000.399900 - (atof)5000.399900(459c4333) -
500039.968000(48f428ff)


At 11:05 AM 2/1/02 +0000, you wrote:
>  for(x=40; x<50; x++) {
>   sprintf(buf,"%.2f",5000 + (float)(x/100.00));
>   Fnum = atof(buf);
>   printf("(buf)%s - (atof)%.2f - %f\n", buf, Fnum, Fnum * 100.00);
>  }


----------------------------------
   Joel Baumert
   Zworld, Senior Software Engineer
   http://www.zworld.com
----------------------------------

#4172 From: Joel Baumert <jbaumert@...>
Date: Fri Feb 1, 2002 4:31 pm
Subject: Re: Re: floating point multiply error
jjbaumert
Send Email Send Email
 
The following code should work better for you... It rounds all of the
values up.  I would suggest you _not_ use a floating point number for a
counter.  You are better off with an integer.  If you choose to use a
floating point number you should at least check it for a range of
values.  When you don't do that you could either miss a value you wanted in
the loop or loop forever depending on your test.

With the following modified program, I am adding .5 to the result and
casting it to a long.  That has the effect of rounding the value to the
nearest integral value.

Hope that helps.

Joel

main()
{
    int x;
    float Fnum;
    char buf[20];

   for(x=40; x<50; x++) {
    sprintf(buf,"%.2f",5000 + (float)(x/100.00));
    Fnum = atof(buf);
    printf("(buf)%s - (atof)%.2f - %ld\n", buf, Fnum, (long)(Fnum * 100.00 +
.5));
   }
}


At 12:36 PM 2/1/02 +0000, you wrote:
>Thanks Bjarne,
>
>I appreciate the problem, however I need to send data to a device
>that requires the value in an unsigned long int, therefore after
>calculations have been done, the value has to be multiplied by 100.
>The device has a configuration command which enables or disables the
>integer or decimal point format of the number.
>
>I have tried the following and it seems to work upto certain amounts
>Ltemp = (unsigned long int)((atof(p) * 100.00)+0.5);
>
>I was just hoping that someone had some advice on this..
>
>regards
>
>rob
>
>--- In rabbit-semi@y..., "Bjarne Nielsen" <bnielsen@p...> wrote:
> > This is a general problem, and has nothing to do with the Rabbit. I
>also use MS Visual C++ as a programming language, and it has the same
>problem, even though it has a resolution of  AFAIR 19 digits!
> > The source to the problem is in the way floating points are
>represented in binary format. No matter how hard you try, can can
>never get 100% accuracy, although more digits help.
> >
> > If your problem is comparing two fp values, you can specify a
>minimum difference. If the difference between two numbers are less
>than your minimum difference, you can accept the numbers to be equal.
> > If it is a matter of representation, I'm not sure there's much you
>can do about it, unless you want to make a higher resolution fp
>library.
> >
> > Cheers
> > Bjarne Nielsen
> >
> >   ----- Original Message -----
> >   From: pplegrub
> >   To: rabbit-semi@y...
> >   Sent: Friday, February 01, 2002 12:05 PM
> >   Subject: [rabbit-semi] floating point multiply error
> >
> >
> >   Hi All,
> >
> >   Why does the floating point multiply give incorrect results, and
>what
> >   is the solution. Below are results of a simple test , multiplying
>a
> >   float by 100.00 - I'm lost.
> >
> >   unsigned long Lnum;
> >   float Fnum;
> >
> >   main()
> >   {
> >     float x;
> >     char buf[20];
> >
> >    for(x=40; x<50; x++) {
> >     sprintf(buf,"%.2f",5000 + (float)(x/100.00));
> >     Fnum = atof(buf);
> >     printf("(buf)%s - (atof)%.2f - %f\n", buf, Fnum, Fnum * 100.00);
> >    }
> >   }
> >
> >   RESULT:
> >   (buf)5000.40 - (atof)5000.40,
> >   500039.97
> >   (buf)5000.41 - (atof)5000.41,
> >   500040.97
> >   (buf)5000.42 - (atof)5000.42,
> >   500042.03
> >   (buf)5000.43 - (atof)5000.43,
> >   500043.03
> >   (buf)5000.44 - (atof)5000.44,
> >   500043.97
> >   (buf)5000.45 - (atof)5000.45,
> >   500044.97
> >   (buf)5000.46 - (atof)5000.46,
> >   500046.03
> >   (buf)5000.47 - (atof)5000.47,
> >   500047.03
> >   (buf)5000.48 - (atof)5000.48,
> >   500047.97
> >   (buf)5000.49 - (atof)5000.49, 500048.97
> >
> >
> >
> >   To unsubscribe from this group, send an email to:
> >   rabbit-semi-unsubscribe@e...
> >
> >
> >
> >   Your use of Yahoo! Groups is subject to
>http://docs.yahoo.com/info/terms/
>
>
>
>To unsubscribe from this group, send an email to:
>rabbit-semi-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


----------------------------------
   Joel Baumert
   Zworld, Senior Software Engineer
   http://www.zworld.com
----------------------------------

#4173 From: Scott Wurcer <scott.wurcer@...>
Date: Fri Feb 1, 2002 4:58 pm
Subject: Hi from a new user
userno232000
Send Email Send Email
 
Hi to all,

Just an introduction. I have been interested in web
enabling demo boards here at work and as a home project,
a web interface for home automation.

To get my feet wet I set aside the weekend to solder
one of our 16 bit A to D's into the breadboard area
and display the result as +-10V in a small auto-refreshing
browser frame. I was done in 3 hours from an almost cold
start (I have never used JavaScript before).

So thanks for the nice product (though it's tough wading
through the docs to find stuff). By supporting CGI and SSI
one can really achive a platform independent browser interface
via HTML/JavaScript. It even worked on my Audrey :-)

My final home setup will be 1) The Rabbit as Gateway/Controller
2) A Marrick X10 to serial bridge 3) An Audrey as display/user
interface.

Anyone else doing home automation with the Rabbit?

Scott Wurcer
ADI Fellow
Analog Devices

#4174 From: "Lynn S. Wood" <lwood@...>
Date: Fri Feb 1, 2002 5:03 pm
Subject: Re: Re: BL1810 and analog input
l_s_wood
Send Email Send Email
 
kevin_hendry wrote:

> The other option that has been suggested to me by members of this
> group is to use external ADC. The implementation on the BL18xx boards
> is cheap, buggy, and poor resolution.

I agree with Kevin -- if you want any sort of decent ADC, use an external
chip.  The Jackrabbit DAC/ADC circuits also have the unfortunate effect
of using up a chunk of CPU time to provide the PWM necessary...

The TLC2543 is a common chip we use -- 11 inputs, serial I/O to the CPU.

				 -Lynn

#4175 From: "Lynn S. Wood" <lwood@...>
Date: Fri Feb 1, 2002 5:04 pm
Subject: Re: Trying to use PC6 as an output...
l_s_wood
Send Email Send Email
 
kevin_hendry wrote:
>
> We are trying to use PC6 as an output. All that we are looking for a
> is fairly rappid pulse from that pin on a BL1800 board.

> Is there some kind of special initialization needed in order to get
> the pin to pulse out.

I would recommend writing to PCFR to ensure that PC6 is _not_ set (i.e.
in serial port mode) -- the BIOS may be setting it that way by default...

				 -Lynn

#4176 From: Tom Collins <tom@...>
Date: Fri Feb 1, 2002 4:57 pm
Subject: Re: floating point multiply error
tomcollinsaz
Send Email Send Email
 
At 12:36 PM +0000 2/1/02, pplegrub wrote:
>Thanks Bjarne,
>
>I appreciate the problem, however I need to send data to a device
>that requires the value in an unsigned long int, therefore after
>calculations have been done, the value has to be multiplied by 100.
>The device has a configuration command which enables or disables the
>integer or decimal point format of the number.
>
>I have tried the following and it seems to work upto certain amounts
>Ltemp = (unsigned long int)((atof(p) * 100.00)+0.5);
>
>I was just hoping that someone had some advice on this..

If it was me, I'd code a special version of atof that would return an
unsigned long int of the float in the string * 100.

Take a look at how atof and atoi (atol?) are written -- it shouldn't
be difficult to have atof keep track of where it is in converting the
string -- either you're in the integer part, on the decimal point, on
the "tenths", on the "hundredths" or "eating up" decimal digits to
find the end of the float.

--
Tom Collins, CTO       InstallCo Computer Services
tom@...      <http://www.installco.com/>

#4177 From: "Kent Johansen" <kent@...>
Date: Fri Feb 1, 2002 5:34 pm
Subject: Re: Input capture chips ?
kentanakron
Send Email Send Email
 
Put a PIC or a Scenix processor on the I2C and program it as an
I2C slave. Suggest a 16F876.
If you need help with the I2C on the PIC, let me know.

If you use a 20MHz version, you have 5 instructions pr uS to work
with. That should be sufficient. For even better resolution, you can
use the capture/compare circuits.

Kent


>
> Hello,
>
> For interfacing my BL card with a RC receiver and accelerometers which provide
a PWM signal
> (pulses from 1 to 2 ms), I need a *very* precise (ie. 5us at least) way of
getting pulse length. I
> already did that with the Input Capture of the 68HC11 and it works great. I
understand that it is
> possible to do that for a *single* input by connecting to INTA with limited
precision (ie. 20 us) .
> Unfortunately, I need 3 channels and better precision.
>
> Do you know of a chip providing extra input captures, interfacing preferably
through I2C or SPI ?
>
> Thanks in advance.
>
> Michel
>
>
>
>                        Yahoo! Groups Sponsor
>
>                            ADVERTISEMENT
>
>
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> rabbit-semi-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

#4178 From: "Kent Johansen" <kent@...>
Date: Fri Feb 1, 2002 5:37 pm
Subject: Re: Re: need help !!!!! cuz serial timer is not an output pin to be used !!!
kentanakron
Send Email Send Email
 
I understand that.
I am talking sync mode. But your trick is valuable. I might try
hooking a sigma-delta AD converter up that I have left until I got a
good idea...
Kent

> The sampling clock is not available in async mode. The serial
> clock is automatically output on one of the Port B pins when
> using an internal clock in clocked serial mode. If you are
> willing to give up a serial port, it is possible to output a
> continuous pulse train on the Port B pin, at the bit-rate you
> have programmed for the clocked-serial mode. You do this by
> issuing a "Tx Trigger" command in the Serial Port Control
> Register WITHOUT loading a byte to the transmit buffer. Because
> there is no data to send, the transmitter continuously sends
> the serial clock to the Port B output. You can then stop this
> output by writing a byte to the transmit buffer, and the pulses
> will stop after the normal eight bit times. Obviously neither
> the receiver or transmitter is available for use during this
> mode of operation... I have used this technique to provide the
> 1.544MHz signal required by a u-law codec, and then used the
> other clocked serial channel to read and write the data to the
> codec.
>
> Monte Dalrymple
>
>
> --- In rabbit-semi@y..., "Kent Johansen" <kent@a...> wrote:
> > The Rabbit has a kind of an uart inside, which takes care of
> sampling the bits at the
> > right time etc. The timing of the sampling starts at the negative
> going edge of the
> > start bit and is determined by PCLK/2, reduced by TIMERA1 and then
> by the
> > respective TIMERA4..7.
> >
> > When RX goes low, the rabbit will wait 1.5 bit times, then sample
> bit 7, wait 1 bit
> > time, sample bit 6 etc. The bits are usually sampled in the
> middle.
> >
> > The 16x clock is not present at any stage in the process (except by
> chance, if
> > processor speed and baud rate matches).
> > TIMERA1 counts to the value in the TAT1R register and divides in
> this way with this
> > number.
> > Same with timer 4-7 and TATxR
> >
> > By using the ASYNC clock input you can determine yourself when the
> bit has to be
> > sampled. You will then send the sample clock into PB0 (PortB) or
> PB1 (Port A).
> > When transmitting, you can set SxCR up so you get the clock out on
> the appropriate
> > one of these pins.
> >
> > That is what the serial ports can do.
> >
> > Clocked serial mode may be used to sync to nearly any signal with a
> few external
> > chips.
> >
> > In your case, the IrDA just has to send a pulse 3/16 of a bit time
> within one bit time.
> > You can most likely use any clock running at 16x baud rate, because:
> >
> > If the phase of the 16x clock is as bad as it could be, i.e. 1/32
> bit time off, all that
> > would happen is that the transmission of the whole byte is offset
> by 1/32 bit time.
> > Since the receiver will start syncing on the flank of the start bit
> (a 0 and therefore a
> > pulse) it will never notice any problems. Since the 0-pulses start
> 1/2 bit time into the
> > bit, 1/32 will never move them outside the bit's allocated time.
> >
> >
> > Send 10..(etc)
> >
> > IrDA signal
> > (startbit) (1) (0)
> > ________~~~_____ ________________ ________~~~_____ etc.
> > 8/16 3/16 5/16 16/16 low
> (again)
> >
> > UART signal
> >
> > ________________~~~~~~~~~~~~~~~ _________________
> >
> >
> > Hope this clarifies it
> >
> > Kent
> >
> > > hi ,Kent
> > >
> > > yes i agree with ya... aft i used this method, my
> > > processor speed is in deep shit !!!! so slow..... and
> > > i can't do other process....
> > >
> > > well then i found another solution, is just to used
> > > another ext chip that can give me this 16xCLK to drive
> > > this IrDA chip. but i'm so suprise that i can't used
> > > the serial timer, which is not an output pin that i
> > > can used for this 16xCLK (16xbaud rate) at first the
> > > is some kind of UART inside there...
> > >
> > > but i'm wrong.... so wrong...
> > > the serial timer is just using the interrupt, and by
> > > using the TIMER_B or A is interrupt base.. which is
> > > not real time.... is kinda of rabbit drawback, yet
> > > advantage to support 4 serial port at the same
> > > time.... perhaps i'm wrong.... yet not very familar
> > > with this processor till now... ;)
> > >
> > > regards
> > > yong
> > >
> > >
> > > > You need to have a look at the GCSR register as
> > > > well.
> > > >
> > > > If you are not using the watchdog, following should
> > > > do:
> > > >
> > > > WrPortI(GCSR,&GCSRShadow,0);
> > > > // proc=OSC/8 and PCLK=OSC/8
> > > > WrPortI(G0CR,&G0CRShadow,((GOCRShadow&~0xc0)| 0x40))
> > > > // CLK = PCLK/4
> > > >
> > > > But your processor now runs at 1/8 of max speed. I
> > > > am sure you don't want that.
> > > >
> > > > I have programmed IrDA myself and I am aware of the
> > > > system with the shorter
> > > > (3/16) pulse for 0 and nothing for 1.
> > > > I don't know if your chip need the 1/16 clock to be
> > > > synchronized with the bit clock.
> > > > Normally, IrDA chips use a 16x clock to generate the
> > > > pulse for a "0", which is 3/16
> > > > long, starting 1/2 bit time into the serial bit.
> > > > This timing is not overly critical, so you
> > > > might get away with not synchronizing it.
> > > >
> > > > Why don't you leave GCSR so you get 8 times your
> > > > desired clock rate out on CLK
> > > > and use a 74HCxxx (I don't remember the xxx) counter
> > > > chip to divide that frequency
> > > > with 8 ? If you need to synchronize with the serial
> > > > bit clock, you could reset the
> > > > counter on negative going flanks of the serial port
> > > > input or output.
> > > > ( if the encode/decode chip needs/allows this. I am
> > > > pretty sure it is not needed.)
> > > >
> > > > There are possibly easier ways. A 16C654 serial chip
> > > > will encode and decode the
> > > > IrDA bit patterns and you benefit from a 60 bytes
> > > > buffer, which is very nice at IrDA
> > > > speeds.
> > > >
> > > > Kent
> > > >
> > > >
> > > > > hi kent,
> > > > >
> > > > > i think u got me wrong in some way.....
> > > > > and i guess i did mention it wrongly as well....
> > > > >
> > > > > > > i need a clock signal to drive some
> > > > encoder/decoder
> > > > > > > chip with 16xCLK rate, which is 16 times of
> > > > the serial
> > > > > > > port baud rate.... ( freq = 1.843 MHZ )
> > > > >
> > > > > in fact i need the clock signal which is ( 16 x
> > > > serial baud rate ) to
> > > > > drive this IrDA encoder/decoder chip.... when
> > > > TX/RX data via serial port.
> > > > >
> > > > > can u pls tell me exactly how to used the PCLK...
> > > > to get this clock
> > > > > rate ( freq = 1.843 MHZ ). i have try to used
> > > > >
> > > > > PCLK output driven with peripheral clock ÷ 2:
> > > > > WrPortI(GOCR, &GOCRShadow, ((GOCRShadow&~0xc0)|
> > > > 0x40)); and
> > > > >
> > > > > PCLK output on (high):
> > > > > WrPortI(GOCR, &GOCRShadow, (GOCRShadow | 0xc0));
> > > > >
> > > > > so how can i ..........
> > > > > > The PCLK is the clock driving the Rabbit. So
> > > > dividing it by 8 and
> > > > > > then by 2 would give you a 1.843MHz CLK that was
> > > > half of the
> > > > > > PCLK and your Rabbit would run 3.686MHz with a
> > > > 29.488 MHz
> > > > > > oscillator. Not fast enough to handle your data.
> > > >
> > > > > currently i'm using RCM2100 to do all this
> > > > job......
> > > > >
> > > > > thnk lot
> > > > >
> > > > >
> > > > > > That sounds like a tough task.
> > > > > >
> > > > > > It sounds like a chip that is meant for a signal
> > > > processor chip. They
> > > > > > usually require bits to be sent into the chip to
> > > > program it at the
> > > > > > same rate as they exit... Be sure that is not
> > > > the case.
> > > > > > I might need some more information to help you.
> > > > > >
> > > > > > 0xC0 will not give you PCLK/2, the two upper
> > > > bits should be 01.
> > > > > >
> > > > > > The PCLK is the clock driving the Rabbit. So
> > > > dividing it by 8 and
> > > > > > then by 2 would give you a 1.843MHz CLK that was
> > > > half of the
> > > > > > PCLK and your Rabbit would run 3.686MHz with a
> > > > 29.488 MHz
> > > > > > oscillator. Not fast enough to handle your data.
> > > >
> > > > > >
> > > > > > If you need exactly 16x the clock rate, you MAY
> > > > be able to use the
> > > > > > serial clocks in async mode with some assembler
> > > > programming. It
> > > > > > is fast, though, and you may need to disable the
> > > > internal RS232
> > > > > > drivers.
> > > > > > I would suggest you generate the clock with some
> > > > external circuitry,
> > > > > > divide by 16 and use that signal to clock the
> > > > bits into the serial
> > > > > port.
> > > > > >
> > > > > > If it involves a sigma-delta AD you might find
> > > > that there is way too
> > > > > > little time to drive it directly.
> > > > > >
> > > > > > Good luck
> > > > > > Kent Johansen
> > > > > >
> > > > > > > hi all the great person over here !!!!
> > > > > > > i really need help for this.....
> > > > > > >
> > > > > > > i need a clock signal to drive some
> > > > encoder/decoder
> > > > > > > chip with 16xCLK rate, which is 16 times of
> > > > the serial
> > > > > > > port baud rate.... ( freq = 1.843 MHZ )
> > > > > > >
> > > > > > > so is iz recomm to used the timer-B or the
> > > > > > > pin PCLK - output (internal clock) ???
> > > > > > >
> > > > > > > if i used PCLK by,
> > > > > > > PCLK output on (high):
> > > > > > > WrPortI(GOCR, &GOCRShadow, (GOCRShadow |
> > > > 0xc0));
> > > > > > >
> > > > > > > then when i tap the pin is should give me
> > > > 1.843MHZ
> > > > > > > clocking signal ready to be used ???
> > > > > > >
> > > > > > > or else what should i set the bits 7 and 6 of
> > > > the
> > > > > > > Global Output Register (GOCR) ????
> > > > > > >
> > > > > > > pls pls.........
> > > > > > > and lot lot of thank for who giving some
> > > > suggestion !!
> > > > > > >
> > > > > > >
> > > > > > >
> > > > __________________________________________________
> > > > > > > Do You Yahoo!?
> > > > > > > Great stuff seeking new owners in Yahoo!
> > > > Auctions!
> > > > > > > http://auctions.yahoo.com
> > > > > > >
> > > > > > > Yahoo! Groups Sponsor
> > > > > > >
> > > > > > > ADVERTISEMENT
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > To unsubscribe from this group, send an email
> > > > to:
> > > > > > > rabbit-semi-unsubscribe@e...
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Your use of Yahoo! Groups is subject to the
> > > > Yahoo! Terms of Service.
> > > > >
> > > > >
> > > > > To unsubscribe from this group, send an email to:
> > > > > rabbit-semi-unsubscribe@e...
> > > > >
> > > > >
> > > > >
> > > > > Your use of Yahoo! Groups is subject to the Yahoo!
> > > > Terms of Service.
> > > >
> > > >
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Great stuff seeking new owners in Yahoo! Auctions!
> > > http://auctions.yahoo.com
> > >
> > >
> > > To unsubscribe from this group, send an email to:
> > > rabbit-semi-unsubscribe@e...
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
>
>
>                        Yahoo! Groups Sponsor
>
>                            ADVERTISEMENT
>
>
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> rabbit-semi-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

#4179 From: Steve Hardy <shardy@...>
Date: Fri Feb 1, 2002 5:50 pm
Subject: Re: Again, uc/OS-II && DHCP == HELP
mean_taipan
Send Email Send Email
 
I can't work it out.  It seems that the code which contains the
variable declarations is not being compiled in.  Try adding
a dummy call to _dobootp() e.g.

	 if (0) _dobootp();

At 09:28 AM 2/1/02 +0100, you wrote:
>The compiler message is:
>line 1572 : ERROR BOOTP.LIB    : _dhcp_expired is out of scope/ not
>declared.
>line 1574 : ERROR BOOTP.LIB    : Assignment to read-only variable not
>allowed.
>line 1574 : ERROR BOOTP.LIB    : Invalid expression - need lvalue.
>line 1574 : ERROR BOOTP.LIB    : _dhcp_expired is out of scope/ not
>declared.
>line 1578 : ERROR BOOTP.LIB    : _dhcp_prev_ip is out of scope/ not
>declared.
>line 1578 : ERROR BOOTP.LIB    : _dhcp_prev_ip is out of scope/ not
>declared.
>
>If I use dhcp_release() before dhcp_acquire(), would it be right?
>Thank you for your help. Best regards
>                Petr Cach

Yes, that would be OK.

Regards,
SJH

#4180 From: Steve Hardy <shardy@...>
Date: Fri Feb 1, 2002 6:16 pm
Subject: Re: Reserving XMEM in RAM
mean_taipan
Send Email Send Email
 
If you xalloc the same amount of memory in the same order, then you will
get the same addresses each time.  The xalloc routine simply decrements
from the top of available memory (see the code - unlike some systems,
you have it!)

Having said that, it would still be prudent to at least save a "magic
value" somewhere so that you could verify that the memory wasn't
corrupted (e.g. by low battery).  FS2 does this for you, but now that
you're going it alone you will have to take care of it.

You say flash is too slow for your config data.  It's only slow for
writes.  I would have thought that config data is mainly read, hardly
ever written.  Do you mean perhaps "dynamic data"?

Regards,
SJH

At 10:43 PM 1/31/02 -0600, you wrote:
>Hi
>
>I am desperately short of root data space in my application, and I want to
>remove the flash file system to free up code space so that I can move the
>DATAORG to 5000H.  I am currently using fs2 to store my configuration data.
>
>I want to use battery backed RAM to store my configuration data, as flash is
>a little slow for my needs.
>
>My questions are:
>
>Is there any way of reserving a chunk of extended RAM in a way that it is in
>the same location each boot, and getting its physical address for use with
>root2xmem, xmem2root and xmem2xmem?
>
>What guarantees are there of getting the same location in RAM by simply
>calling xalloc in the same place every time before starting ucos2?
>
>Thanks
>Raymond Parfett

#4181 From: Bill Auerbach <bill@...>
Date: Fri Feb 1, 2002 6:35 pm
Subject: Re: floating point multiply error
bill_ct
Send Email Send Email
 
> pplegrub writes on 06:05 AM 02/01/2002
  >Why does the floating point multiply give incorrect results

The decimal precision for an IEEE single precision float is 6 (a standard C
compiler will have a float.h - see the FLT_DIG macro).  Therefore, the 7th
and later digits are meaningless (i.e. not correct or incorrect).

Bill

#4182 From: tim murphy <tim@...>
Date: Fri Feb 1, 2002 6:38 pm
Subject: Re: Re: Close port isn't closing the port..
tim@...
Send Email Send Email
 
Thanks for the code..
But it didn't work.. My port is still staying open..

Practically:

	 WrPortI(PCFR, &PCFRShadow, (PCFRShadow & ~0x10));
	 serBopen(57600);
	 serBrdFlush();
	 WrPortI(PCDR, &PCDRShadow, (PCDRShadow & ~0x10));
	 serBclose();

Am I doing something wrong?
thanks
tim

On Fri, 1 Feb 2002, fisherman95616 wrote:

> Hi,
>
> Here's an example of how you can set the serial Port B transmit line
> low.
>
> // Initialize bits PC4 and PC5 (serial Port B) as normal I/O
> WrPortI(PCFR, &PCFRShadow, (PCFRShadow & ~0x10));
>
> // Set bit PC4 low
> WrPortI(PCDR, &PCDRShadow, (PCDRShadow & ~0x10));
>
>
> EK
>
>
> --- In rabbit-semi@y..., tim murphy <tim@q...> wrote:
> > Hi Kent,
> >
> > Thanks for the reply.. I don't know what you mean though.. I
> haven't configured the port to do anything special,
> > what is "normal use" in PCFR? How can I set the output low?
> >
> > thanks
> > tim
> >
> > ----
> > I would guess the port is still set up for serial use.
> > If you set the port to "normal use" in PCFR and set your output
> low,
> > your device should turn off.
> > Kent
> >
> >
> > > I have a device pulling some power off of the B serial port.
> > > It stays off until I open the port with serBopen(57600)
> > > Then when I close it with serBclose, the port is still open (my
> device is
> > > still on). When I restart the program, and the port is closed,
> the device
> > > is off again.
> > >
> > > serBclose(I REALLYMEANIT) :)
> > > thanks
> > >
> > >
> > >
> > >                        Yahoo! Groups Sponsor
> > >
> > >                                  []
> > >
> > >
> > >
> > >
> > >
> > >
> > > To unsubscribe from this group, send an email to:
> > > rabbit-semi-unsubscribe@e...
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
> >
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > rabbit-semi-unsubscribe@e...
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
> To unsubscribe from this group, send an email to:
> rabbit-semi-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

#4183 From: "fisherman95616" <fisherman95616@...>
Date: Fri Feb 1, 2002 7:10 pm
Subject: Re: Close port isn't closing the port..
fisherman95616
Send Email Send Email
 
Hi,

Not sure if this will work, but here's my idea on to get your device
to power-down.

void custom_serBclose( void )
{
serBclose();
WrPortI(PCFR, &PCFRShadow, (PCFRShadow & ~0x10));
WrPortI(PCDR, &PCDRShadow, (PCDRShadow & ~0x10));
}


main()
{
serBopen(57600);
serBrdFlush();
serBwrFlush():
//
// Do serial stuff
//
custom_serBclose();
}



--- In rabbit-semi@y..., tim murphy <tim@q...> wrote:
> Thanks for the code..
> But it didn't work.. My port is still staying open..
>
> Practically:
>
>  WrPortI(PCFR, &PCFRShadow, (PCFRShadow & ~0x10));
>  serBopen(57600);
>  serBrdFlush();
>  WrPortI(PCDR, &PCDRShadow, (PCDRShadow & ~0x10));
>  serBclose();
>
> Am I doing something wrong?
> thanks
> tim
>
> On Fri, 1 Feb 2002, fisherman95616 wrote:
>
> > Hi,
> >
> > Here's an example of how you can set the serial Port B transmit
line
> > low.
> >
> > // Initialize bits PC4 and PC5 (serial Port B) as normal I/O
> > WrPortI(PCFR, &PCFRShadow, (PCFRShadow & ~0x10));
> >
> > // Set bit PC4 low
> > WrPortI(PCDR, &PCDRShadow, (PCDRShadow & ~0x10));
> >
> >
> > EK
> >
> >
> > --- In rabbit-semi@y..., tim murphy <tim@q...> wrote:
> > > Hi Kent,
> > >
> > > Thanks for the reply.. I don't know what you mean though.. I
> > haven't configured the port to do anything special,
> > > what is "normal use" in PCFR? How can I set the output low?
> > >
> > > thanks
> > > tim
> > >
> > > ----
> > > I would guess the port is still set up for serial use.
> > > If you set the port to "normal use" in PCFR and set your output
> > low,
> > > your device should turn off.
> > > Kent
> > >
> > >
> > > > I have a device pulling some power off of the B serial port.
> > > > It stays off until I open the port with serBopen(57600)
> > > > Then when I close it with serBclose, the port is still open
(my
> > device is
> > > > still on). When I restart the program, and the port is
closed,
> > the device
> > > > is off again.
> > > >
> > > > serBclose(I REALLYMEANIT) :)
> > > > thanks
> > > >
> > > >
> > > >
> > > >                        Yahoo! Groups Sponsor
> > > >
> > > >                                  []
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > To unsubscribe from this group, send an email to:
> > > > rabbit-semi-unsubscribe@e...
> > > >
> > > >
> > > >
> > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service.
> > >
> > >
> > >
> > >
> > > To unsubscribe from this group, send an email to:
> > > rabbit-semi-unsubscribe@e...
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > rabbit-semi-unsubscribe@e...
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >

#4184 From: "Raymond Parfett Exit 38" <raymondp@...>
Date: Fri Feb 1, 2002 7:53 pm
Subject: Re: Reserving XMEM in RAM
raymondparfett
Send Email Send Email
 
Steve

Thanks for the info.

My application is a system controller, where the user can configure the
system via a another embedded TCP/IP device.  Because we're in the
embedded/industrial arena, we need to detect physical ethernet disconnects
quickly, and we use ICMP pings to do this, and also to verify that a device
is present before trying to talk to it (this is for the UDP controlled
devices on the same network).  When the user saves to flash, my other IP
based device does not receive answers to its pings, and closes the socket,
because flash writes in FS2 do not yield to other tasks.

The main reason for dropping the (incredibly convenient) flash file system
is the amount of root code it eats up.  I need to reduce the root code, so
that I can increase the root data.

I have performed my own storage of config data in various media for a while,
so if I can get at the same memory location each time, I can take care of
the rest.

I'm sure I must be writing a pretty big application, as I have already had
an error where the compiler ran out of symbols (which was very quickly
solved by a call to tech support), and I've never seen that problem raised
anywhere else on this forum.  I'm just panicky that I may be expecting too
much from the Rabbit, but so far it is behaving itself admirably, with the
exception of resetting a debug session.

Raymond
----- Original Message -----
From: "Steve Hardy" <shardy@...>
To: <rabbit-semi@yahoogroups.com>
Sent: Friday, February 01, 2002 12:16
Subject: Re: [rabbit-semi] Reserving XMEM in RAM


>
> If you xalloc the same amount of memory in the same order, then you will
> get the same addresses each time.  The xalloc routine simply decrements
> from the top of available memory (see the code - unlike some systems,
> you have it!)
>
> Having said that, it would still be prudent to at least save a "magic
> value" somewhere so that you could verify that the memory wasn't
> corrupted (e.g. by low battery).  FS2 does this for you, but now that
> you're going it alone you will have to take care of it.
>
> You say flash is too slow for your config data.  It's only slow for
> writes.  I would have thought that config data is mainly read, hardly
> ever written.  Do you mean perhaps "dynamic data"?
>
> Regards,
> SJH
>
> At 10:43 PM 1/31/02 -0600, you wrote:
> >Hi
> >
> >I am desperately short of root data space in my application, and I want
to
> >remove the flash file system to free up code space so that I can move the
> >DATAORG to 5000H.  I am currently using fs2 to store my configuration
data.
> >
> >I want to use battery backed RAM to store my configuration data, as flash
is
> >a little slow for my needs.
> >
> >My questions are:
> >
> >Is there any way of reserving a chunk of extended RAM in a way that it is
in
> >the same location each boot, and getting its physical address for use
with
> >root2xmem, xmem2root and xmem2xmem?
> >
> >What guarantees are there of getting the same location in RAM by simply
> >calling xalloc in the same place every time before starting ucos2?
> >
> >Thanks
> >Raymond Parfett
>
>
>
> To unsubscribe from this group, send an email to:
> rabbit-semi-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

Messages 4155 - 4184 of 41861   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help