comp.lang.ada
 help / color / mirror / Atom feed
From: rrr.eee.27@gmail.com
Subject: Re: AVR Usart send number string with no 'Image
Date: Wed, 24 Apr 2013 21:54:55 -0700 (PDT)
Date: 2013-04-24T21:54:55-07:00	[thread overview]
Message-ID: <cc9cbc30-f55a-494f-a166-0de7c6d25967@googlegroups.com> (raw)
In-Reply-To: <931385b2-3520-4d7a-b56f-6d0d0b06d467@googlegroups.com>

On Thursday, April 25, 2013 3:27:52 AM UTC+2, Rego, P. wrote:
> I am trying to send a numeric string over Usart in an AVR ATmega2560, using avr-elf-windows. So I coded a function Put (Data : String) which works well, and a function Put (Data : Unsigned_8) which actually sends the Character represented by Data : Unsigned_8. 
> 
> 
> 
> But I need now a function which sends really the number, not its equivalent character. So I think I could convert the number into a string and send it. The problem is that avr-elf-windows has no 'Image available, so I have to implement it by hand. How could I do it?
> 

See the package AVR.Int_Img in AVR-Ada.  It contains various attempts for generating string representations of integers.

http://sourceforge.net/p/avr-ada/code/ci/master/tree/avr/avr_lib/avr-int_img.ads
http://sourceforge.net/p/avr-ada/code/ci/master/tree/avr/avr_lib/avr-int_img.adb

The next version of AVR-Ada will add a new way based on Dmitry's String_Edit package.

http://www.dmitry-kazakov.de/ada/strings_edit.htm

HTH 
   Rolf



  parent reply	other threads:[~2013-04-25  4:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25  1:27 AVR Usart send number string with no 'Image Rego, P.
2013-04-25  2:03 ` Shark8
2013-04-25 10:55   ` Rego, P.
2013-04-26  2:28     ` Rego, P.
2013-04-26  5:50       ` Simon Wright
2013-04-30  2:58         ` Rego, P.
2013-04-26 14:52       ` Shark8
2013-04-26 21:10         ` Shark8
2013-04-30  3:00           ` Rego, P.
2013-04-25  4:54 ` rrr.eee.27 [this message]
2013-04-25 10:58   ` Rego, P.
2013-05-01 20:35 ` Rego, P.
2013-05-01 21:00   ` Simon Wright
2013-05-01 22:07     ` Rego, P.
2013-05-01 22:30       ` Jeffrey Carter
2013-05-01 22:46         ` Rego, P.
2013-05-01 23:29       ` Dennis Lee Bieber
2013-05-01 22:32   ` Shark8
2013-05-01 23:00     ` Rego, P.
2013-05-01 23:09       ` Shark8
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox