Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: Atmel Data Flash

Re: Atmel Data Flash

2005-10-29 by raimond712002

The file below is my dataflash library. It is a professional 
implementation, but I can make it open source here because you
can't know the real application (which is very big).
Some comments: SPI is mode 3, I can't remember why, but I can 
remember this was a 'must' at that time. GCC please.

Check the SPI pins, they are used for programming the mega32 too. 
Check the 3.3V power for the dataflash chip.
Good luck!

/*====================================================================
====================
                            AT45DB041 DataFlash Library
Chip: ATMEGA64
Freq: 4.9152 MHz
======================================================================
==================*/
#include <string.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/eeprom.h>
#include "type.h"
#include "rtos.h"
#include "dataflash.h"

/*                NVDS EEPROM MEMORY - 16bit locations

NVDS Memory = High endurance eeprom memory, soft implemented, 16bit.
One high endurance 16bit location is maintained by an eeprom array 
organized 
as follow:
 - first byte is the direction byte (0xFF=ahead, 0x00=back).
 - FACTOR-1 bytes as moving flags.
 - FACTOR words for storage.

So, for one 16bit high endurance eeprom location, it is consumed 
FACTOR*3 
eeprom bytes! FACTOR is the multiplication endurance factor for the 
internal
eeprom. So, if the internal eeprom has an 100,000 writes endurance, 
a FACTOR = 100 will make the 16bit value have 10,000,000 writes 
endurance! 
(but with the expense of 300 bytes of eeprom for only one 16bit 
value!).

The eeprom array need not be initialized. Anyway, first reading the 
value 
after reset with ReadNVDS() function should be compared against 
permissible 
range (if any).
*/

#define FACTOR	16

/* Search the last flag != 0xFF in eeprom (16 flags zone)
   Return the address of the high byte of the value */
   
static char search_last(char *eetab)
{
	char i;
	
	for (i = FACTOR-1; i; i--) {
		if (eeprom_read_byte(eetab+i) != 0xff) break;
	}
	return i;
}


static void write_ahead(char *eetab, char index, uint val)
{
	eeprom_write_byte(eetab+FACTOR+index*2+2, (char)(val>>8));
	eeprom_write_byte(eetab+FACTOR+index*2+3, (char)val);
	eeprom_write_byte(eetab+index+1, 0x00);
}


static void write_back(char *eetab, char index, uint val)
{
	eeprom_write_byte(eetab+FACTOR+index*2-2, (char)(val>>8));
	eeprom_write_byte(eetab+FACTOR+index*2-1, (char)val);
	eeprom_write_byte(eetab+index, 0xff);	
}


void WriteNVDS(char *eetab, uint val)
{
	char i;
	
	i = search_last(eetab);
	if (eeprom_read_byte(eetab) == 0xff) { 	/* DIR = ahead */
		if (i != FACTOR-1) {				/* 
It's not last */
			write_ahead(eetab, i, val);
		} else {					
		/* Last pointer */
			write_back(eetab, i, val);
			eeprom_write_byte(eetab, 0x00);	/* DIR -> 
back */
		}
	} else {						
		/* DIR = back */
		if (i) {					
		/* It's not first */
			write_back(eetab, i, val);
		} else {					
		/* First pointer */
			write_ahead(eetab, i, val);
			eeprom_write_byte(eetab, 0xff);	/* DIR -> 
ahead */
		}
	}
}


uint ReadNVDS(char *eetab)
{
	char i;
	
	i = search_last(eetab) * 2;
	return ((uint)eeprom_read_byte(eetab+FACTOR+i)<<8) + 
eeprom_read_byte(eetab+FACTOR+i+1);
}


/* SPI port */

/* Enables spi port in master mode. 
   Direction for bits are set in main() */
   
void spi_init()
{
 	SPCR = 0x5C; 		/* MODE 3, Master, fastest rate, no 
intr. */
  	SPSR = 1;			/* X2 clk */
}


/*	Shifts one byte on the spi port. */

void wrspi(char c)
{
  	SPDR = c;
  	while (!(SPSR & (1<<SPIF)));
}


char rdspi()
{
  	SPDR = 0;
  	while (!(SPSR & (1<<SPIF)));
  	return SPDR;
}


/*                            DATA FLASH

Reading and writing to DataFlash device is implemented in a circular 
fashion.
There are two pointers, one for reading and one for writing. The 
DataFlash
device contains 2048 pages, each page containing two records. So, 
there are 
4096 records, 132 bytes each. 

Because the writing is done in a circular fashion, the wearing is 
assured
(every page must be updated once per 10000 writes in that sector). 
Because 
the (larger) sector has 512 pages, a page is updated once every 512 
writes, 
so this is OK.

Pointers for in and out are maintained in a high endurance eeprom 
area, 
because they must be updated every record write/read from DataFlash. 
High endurance eeprom is achieved in software, every high endurance 
16bit 
location consuming an array in eeprom. See high endurance eeprom 
section.
*/

uint DFPin, DFPout;				/* pointers in 
dataflash */
char EETin[48] eeprom;			/* memorized in high 
endurance eeprom */
char EETout[48] eeprom;


void DFPin_read()
{
	DFPin = ReadNVDS((char*)EETin);
	if (DFPin >= 4096) DFPin = 0;
}


void DFPout_read()
{
	DFPout = ReadNVDS((char*)EETout);
	if (DFPout >= 4096) DFPout = 0;
}


void DFPin_write()
{
	WriteNVDS((char*)EETin, DFPin);
}


void DFPout_write()
{
	WriteNVDS((char*)EETout, DFPout++);
}


/* Inits the DataFlash device. 
   Must be called only once, after reset. */
   
void df_init()
{
	spi_init();
	DFPin_read();
	DFPout_read();
}


#define SS0	clr(PORTB,0) 		/* CS low */
#define SS1	set(PORTB,0) 		/* CS high */

void df_ready()
{
	char stat;

	for (;;) {
		SS0; 
		wrspi(0x57); 			/* opcode */
		stat = rdspi();			/* read status byte */
		SS1;
		if (stat & 0x80) break; /* ready */
		os_pause();
	}
}


/* Writes a block of data (132bytes = 1/2page) to the DataFlash 
device. 
   The write is controlled by the DFPin pointer. Before calling,
   check if there is space left in dataflash!
   src: source array.
   Usage: if (!df_full()) df_write(src); */

void df_write(char *src)
{
	uchar i, BFA;
  
	BFA = (DFPin & 1) ? 132 : 0; 		/* buffer address */
	
	/* Main memory to buffer1 transfer: 
	   \ [0x53] [0000.PPPP] [PPPP.PPPx] [xxxx.xxxx] / */
	df_ready();
	SS0; 
	wrspi(0x53); 						/* 
opcode */
	wrspi(DFPin>>8); 					/* 
address */
	wrspi(DFPin); 
	wrspi(0); 
	SS1;
	
	/* Write src to buffer1: 
	   \ [0x84] [0000.xxxx] [xxxx.xxxB] [BBBB.BBBB] ...data... / 
*/	   
	df_ready();
	SS0; 
	wrspi(0x84); 						/* 
opcode */
	wrspi(0); 						
	/* address */
	wrspi(0); 
	wrspi(BFA); 
	for (i = 0; i < 132; i++) {
		wrspi(src[i]);					/* 
data */
	}
	SS1;

	/* Buffer program with builtin erase: 
	   \ [0x83] [0000.PPPP] [PPPP.PPPx] [xxxx.xxxx] / */
	df_ready();
	SS0; 
	wrspi(0x83);						/* 
opcode */
	wrspi(DFPin>>8);					/* 
address */
	wrspi(DFPin); 
	wrspi(0);
	SS1;
	DFPin = (DFPin + 1) & 4095; 		/* Update in pointer 
*/
	DFPin_write();
}


/* Reads a block of data from the DataFlash device. The read is 
controlled
   by the DFPout pointer. 132 bytes are read. Before calling, check 
if there
   are still records in dataflash!
   dst: the address of the buffer where to put the bytes read.
   Usage: if (!df_empty()) df_read(dst); */
   
void df_read(char *dst)
{
	uchar i, BFA;
	
	BFA = (DFPout & 1) ? 132 : 0; 		/* buffer address */
	
	/* Main memory to buffer1 transfer: 
	   \ [0x53] [0000.PPPP] [PPPP.PPPx] [xxxx.xxxx] / */  
	df_ready();
	SS0; 
	wrspi( 0x53 ); 						/* 
opcode */
	wrspi( DFPout >> 8 ); 				/* address */
	wrspi( DFPout ); 
	wrspi( 0 ); 
	SS1;
	
	/* Read buffer1 to dst: 
	   \ [0x54] [0000.xxxx] [xxxx.xxxB] [BBBB.BBBB] 
[x] ...data... / */
	df_ready();
	SS0; 
	wrspi( 0x54 ); 						/* 
opcode */
	wrspi( 0 );						
	/* address */
	wrspi( 0 ); 
	wrspi( BFA ); 
	wrspi( 0 ); 						/* 
don't care */
	for (i = 0; i < 132; i++) {
		dst[ i ] = rdspi(); 			/* data */
	}
	SS1;
	DFPout = (DFPout + 1) & 4095; 		/* Update out pointer 
*/
	DFPout_write();
}


/* Get the number of records stored in DataFlash */

uint df_records()
{
	return (DFPin - DFPout + ((DFPin < DFPout) ? 4096 : 0));
}


/* Get the EMPTY flag.
   DataFlash is empty, we have nothing to read. */
   
char df_empty()
{
	return (df_records() == 0);
}


/* Get the FULL flag.
   DataFlash is full, we cannot write anymore. */
char df_full()
{
	return (df_records() == 4095);
}

Atmel Data Flash

2005-10-29 by Larry Barello

I am trying to mate an AT45DB041B (4mb data flash) with an ATMEGA32.  The
interface seems straightforward: SPI mode 0 (CPOL = CPHA = 0), but if I
follow the proscribed "DataFlashReady" algorithm the chip only returns "not
ready (e.g. 0x4E).

I.e.:

Void WaitDataFlash(void)
{
	FLASH_CS(TRUE);
	SPI_Write(0x57);	// SR read command
	While(!(SPI_Read() & 0x80))
		;
	FLASH_CS(FALSE);
}

Has anyone experience with this chip and give any sage advice?  I have tied
/reset and /wp to VCC.  /CS is controlled by a port bit and the rest of the
SPI crew are attached to their respective pins.

Have I misinterpreted what SPI mode 0 is?  I previously wrote routines for
some Atmel EEPROM chips and it worked pretty much first time.  The Data
flash routines are even simpler, but, of course, they don't work :(

-----------
Larry Barello
www.barello.net

Traffic?

2005-10-29 by Thomas Keller

HI!   Is it just me, or has the traffic been extremely light on the
list of late?

Tom

A related query on external memory

2005-10-29 by Thomas Keller

On Sat, 2005-10-29 at 00:14 -0700, Larry Barello wrote:
> I am trying to mate an AT45DB041B (4mb data flash) with an ATMEGA32.
> The interface seems straightforward: SPI mode 0 (CPOL = CPHA = 0), but
> if I follow the proscribed "DataFlashReady" algorithm the chip only
> returns "not ready (e.g. 0x4E).

   This brings to mind a question that popped into my head this morning.
I was reading the latest issue of EE Times (free trade journal, highly
recommended, www.eetimes.com), foudn an article on OneNAND RAM.  Seems
Samsung has developed a melded terchnology which offers the best
attributes of both Nor and Nand Flash technologies, plus a relatively
fast erase time (108 MB/s reads, 10 MB/s writes, and 64 MB/s erase
perforance, and available in 128 Mb through 4 Gb sizes).  Also comes in
at about 30% less expensive than Nor Flash RAM (which is still more
expensive than Nand, but the OneNand technology offers far superior
performance).

   In any case, per the article, apparently the interface to Nor RAMS
and Nand RAMS is different (e.g., not compatible).  The OneNand uses the
Nor-style interface.  Does anyone here have eany experience yusing Nor
Flash on an AVR?  How is it done?

   For more informaiton on OneFlash, see www.samsung.com/semi/onmenand

Tom

RE: [AVR-Chat] Re: Atmel Data Flash

2005-10-29 by Larry Barello

I misinterpreted the data sheet (not hard to do in this particular case) and
thought the mode3 op-codes were mode0 op-codes.  Once I swapped everything
started working.  Having your init code tying 0x57 with mode3 was the clue
that set me on the right path.

Thanks!


-----------
Larry Barello
www.barello.net


| -----Original Message-----
| From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
| Of raimond712002
| Sent: Saturday, October 29, 2005 1:04 AM
| To: AVR-Chat@yahoogroups.com
| Subject: [AVR-Chat] Re: Atmel Data Flash
| 
| The file below is my dataflash library. It is a professional
| implementation, but I can make it open source here because you
| can't know the real application (which is very big).
| Some comments: SPI is mode 3, I can't remember why, but I can
| remember this was a 'must' at that time. GCC please.
| 
| Check the SPI pins, they are used for programming the mega32 too.
| Check the 3.3V power for the dataflash chip.
| Good luck!
| 
| /*====================================================================
| ====================
|                             AT45DB041 DataFlash Library
| Chip: ATMEGA64
| Freq: 4.9152 MHz
| ======================================================================
| ==================*/
| #include <string.h>
| #include <avr/io.h>
| #include <avr/pgmspace.h>
| #include <avr/eeprom.h>
| #include "type.h"
| #include "rtos.h"
| #include "dataflash.h"
|

Re: [AVR-Chat] Traffic?

2005-10-29 by John Samperi

At 01:43 AM 30/10/2005, you wrote:
>   HI!   Is it just me, or has the traffic been extremely light on the
>list of late?

No one has any problems anymore :-)
I guess once we start using Studio 4.12 we may have a bit
more traffic.

By the way I posted a question in relation to your experiences
with Delphi on the off topic forum of avrfreaks. So if you have
used Delphi may want to read the post and perhaps comment here,
it's a bit more cosy :-)



Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] Traffic?

2005-10-30 by Don Ingram

Is anyone actually successfully using Studio 4.12 yet?  I tried installing it 
and the install kept crashing so I took that as an omen to give it a few months...

Cheers

Don
Show quoted textHide quoted text
> 
>>  HI!   Is it just me, or has the traffic been extremely light on the
>>list of late?
> 
> 
> No one has any problems anymore :-)
> I guess once we start using Studio 4.12 we may have a bit
> more traffic.
> 
> By the way I posted a question in relation to your experiences
> with Delphi on the off topic forum of avrfreaks. So if you have
> used Delphi may want to read the post and perhaps comment here,
> it's a bit more cosy :-)
> 
>

Re: [AVR-Chat] Traffic?

2005-10-30 by Dennis

Using 4.12 successfully. Simulator says my T0 timer isn't loading a damn 
thing (ATmega168) which the hardware probably isn't since I have an 
observable problem in the harware that could be caused by it.
What bugs me, is that the load for the T2 timer is exactly the same as the 
T0, except, of course, for the register assignment.
Curious.
----- Original Message ----- 
Show quoted textHide quoted text
From: "Don Ingram" <don@led.com.au>
To: <AVR-Chat@yahoogroups.com>
Sent: Saturday, October 29, 2005 7:02 PM
Subject: Re: [AVR-Chat] Traffic?


> Is anyone actually successfully using Studio 4.12 yet?  I tried installing 
> it
> and the install kept crashing so I took that as an omen to give it a few 
> months...
>
> Cheers
>
> Don
>
>
>>
>>>  HI!   Is it just me, or has the traffic been extremely light on the
>>>list of late?
>>
>>
>> No one has any problems anymore :-)
>> I guess once we start using Studio 4.12 we may have a bit
>> more traffic.
>>
>> By the way I posted a question in relation to your experiences
>> with Delphi on the off topic forum of avrfreaks. So if you have
>> used Delphi may want to read the post and perhaps comment here,
>> it's a bit more cosy :-)
>>
>>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

Re: [AVR-Chat] Traffic?

2005-10-31 by Thomas Keller

On Sun, 2005-10-30 at 09:25 +1100, John Samperi wrote:
> At 01:43 AM 30/10/2005, you wrote:
> >   HI!   Is it just me, or has the traffic been extremely light on
> the list of late?
> No one has any problems anymore :-)
> I guess once we start using Studio 4.12 we may have a bit
> more traffic.
> By the way I posted a question in relation to your experiences
> with Delphi on the off topic forum of avrfreaks. So if you have
> used Delphi may want to read the post and perhaps comment here,
> it's a bit more cosy :-)

  Well.   I do not use, and never have used Delphi, and frankly am not
even sure I know what it is.

Tom

Re: [AVR-Chat] Traffic?

2005-10-31 by John Samperi

At 03:31 PM 31/10/2005, you wrote:
>   Well.   I do not use, and never have used Delphi, and frankly am not
>even sure I know what it is.

Delphi is an IDE that lets you make pretty Windows programs
just like the ones you buy at the shop :-)

It is sold by Borland and a few people on this list use it,
they just are not admitting it.

I use it to develop interfaces that can talk to AVRs in our
product HOWEVER even though I would give these away by posting
them on the website I could find myself in troubles because they
are developed on a free personal edition which cannot be used for
commercial applications. I am prepared to pay for the program BUT
Borland has a free version (as above) then a professional version
(the cheapest) which costs about AUD$1600.00 which I'm not prepared
to pay because it would not return any money and therefore cannot
justify the costs.

I have tried Lazarus which is an open source program that
works pretty much the same as Delphi....except that it doesn't
work :-) and it worth every cents you don't pay for it.

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] Traffic?

2005-10-31 by Ralph Hilton

On Mon, 31 Oct 2005 16:40:08 +1100 you wrote:

>At 03:31 PM 31/10/2005, you wrote:
>>   Well.   I do not use, and never have used Delphi, and frankly am not
>>even sure I know what it is.
>
>Delphi is an IDE that lets you make pretty Windows programs
>just like the ones you buy at the shop :-)
>
>It is sold by Borland and a few people on this list use it,
>they just are not admitting it.

I used it for a while a few years ago much preferring it to VB.
I switched to Borland C++ Builder a couple of years ago.
For me, programming AVRs in C and windows apps in C++ rather than Pascal, results in less
silly syntax errors. It also has a usefulness in that sometimes chunks of code can be
tested in Windows and then transferred to an AVR with little change.
--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net

Re: [AVR-Chat] Traffic?

2005-10-31 by Thomas Keller

On Mon, 2005-10-31 at 16:40 +1100, John Samperi wrote:
> At 03:31 PM 31/10/2005, you wrote:
> >   Well.   I do not use, and never have used Delphi, and frankly am
> >not even sure I know what it is.
> Delphi is an IDE that lets you make pretty Windows programs
> just like the ones you buy at the shop :-)
> It is sold by Borland and a few people on this list use it,
> they just are not admitting it.
> I use it to develop interfaces that can talk to AVRs in our
> product HOWEVER even though I would give these away by posting
> them on the website I could find myself in troubles because they
> are developed on a free personal edition which cannot be used for
> commercial applications. I am prepared to pay for the program BUT
> Borland has a free version (as above) then a professional version
> (the cheapest) which costs about AUD$1600.00 which I'm not prepared
> to pay because it would not return any money and therefore cannot
> justify the costs.


   Yes.  Unfortunately, Borland International lost sight of it's
original business model. I was the proud owner of Borland Pascal 1.0 for
CP/M, for all of $25 in 1984 or 1985.  Their later products got
ridiculously expensive.  In my not so humble opinion, this is why
Borland is no longer a major player in the commercial software market.

> I have tried Lazarus which is an open source program that
> works pretty much the same as Delphi....except that it doesn't
> work :-) and it worth every cents you don't pay for it.

  When you say "it doesn't work," what exactly do you mean?  Does it
simply not function at all, or not function at all?   Is it that you are
unhappy with the resultant UIs, or that they are useless?

Tom

Re: [AVR-Chat] Traffic?

2005-10-31 by Bruce

I was thinking of moving towards C++ Builder.    I take it you would 
recommend it over FoxPro or VB, which I am trying to get away from.   
How about C++ over  Java ?  

I only program for my own needs, and I don't know much about the 
differences of different languages.  

Bruce

Ralph Hilton wrote:
Show quoted textHide quoted text
> On Mon, 31 Oct 2005 16:40:08 +1100 you wrote:
>
> >At 03:31 PM 31/10/2005, you wrote:
> >>   Well.   I do not use, and never have used Delphi, and frankly am not
> >>even sure I know what it is.
> >
> >Delphi is an IDE that lets you make pretty Windows programs
> >just like the ones you buy at the shop :-)
> >
> >It is sold by Borland and a few people on this list use it,
> >they just are not admitting it.
>
> I used it for a while a few years ago much preferring it to VB.
> I switched to Borland C++ Builder a couple of years ago.
> For me, programming AVRs in C and windows apps in C++ rather than 
> Pascal, results in less
> silly syntax errors. It also has a usefulness in that sometimes chunks 
> of code can be
> tested in Windows and then transferred to an AVR with little change.
> --
> Ralph Hilton
> http://www.ralphhilton.org
> C-Meter: http://www.cmeter.org
> FZAOINT http://www.fzaoint.net
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
>     *  Visit your group "AVR-Chat
>       <http://groups.yahoo.com/group/AVR-Chat>" on the web.
>        
>     *  To unsubscribe from this group, send an email to:
>        AVR-Chat-unsubscribe@yahoogroups.com
>       <mailto:AVR-Chat-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>        
>     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>

Re: [AVR-Chat] Traffic?

2005-10-31 by Ralph Hilton

On Mon, 31 Oct 2005 11:43:43 -0500 you wrote:

>I was thinking of moving towards C++ Builder.    I take it you would 
>recommend it over FoxPro or VB, which I am trying to get away from.   
>How about C++ over  Java ?  

I haven't tried FoxPro but definitely prefer C++Builder to VB.
I downloaded a free Java setup from the Sun website and I found it extremely sluggish.
So for purely Windows apps I don't see any advantage to Java.

>I only program for my own needs, and I don't know much about the 
>differences of different languages.  

Sometimes its a matter of individual preference. I find C/C++ versatile and fast to
program in.
--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net

Re: [AVR-Chat] Traffic?

2005-10-31 by John Samperi

At 03:15 AM 1/11/2005, you wrote:
>   When you say "it doesn't work," what exactly do you mean?  Does it
>simply not function at all, or not function at all?   Is it that you are
>unhappy with the resultant UIs, or that they are useless?

It seems very flaky, i.e. things work on the IDE one minute the
next minute they don't. I manage to crash it regularly, but it
could be because I don't know what I'm doing.

The people at Lazarus seem to be pretty responsive though. Once
I managed to get into their mailing list (the website registration
doe not work even though it say you are registered) they were quite
helpful. I picked up a bug of something that worked on the previous
version but didn't in the latest, and they seem to be onto it now.

I think I'll persevere with it for a while.



Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

RE: [AVR-Chat] Traffic?

2005-10-31 by Martin Jay McKee

My personal preference is to program in C++ however I do have to say that java has its uses. It has a few features that are easier to use than either C++ Builder (which I used to use) or Visual C++ (which I currently use), mainly I find that coding a GUI goes faster in java. Then again with a visual GUI Editor as both C++ Builder and Visual Studio have it becomes a mute point. As far as java being sluggish I’m not sure whether you are referring to the IDE or to the actual running of the program. If it’s the IDE there isn’t much that can be done but there are two virtual machines that Sun makes available for Java. The first and the one that you are most likely to have is the Standard Edition, it works well but is optimized for loading programs, not running them. The server virtual machine is optimized for running programs and does a good job of speeding critical (or even not so critical) code up, but it does take longer to load programs, and the virtual machine is larger.

If it were me I’d stick with C++, but if you are doing GUI on different OSes it might make sense to go with Java. If you download the Enterprise Edition SDK, JSEE, for the server virtual machine, and Eclipse for the IDE you end up with a powerful, multiplatform developing system for nothing.

Martin Jay McKee

RE: [AVR-Chat] Traffic?

2005-10-31 by John Samperi

At 10:37 AM 1/11/2005, you wrote:
>My personal preference is to program in C++

The things I find useful with Delphi (Lazarus?) are:

Cross platform compatibility.

Small code and extremely fast compilation (at least for
my small projects)

Single file + a .ini file which my program generates itself
with default values.

No DLLs, VBruns, comms packages, or interpreters, just an .exe file

Don't like Borland and their pricing :-)



Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

RE: [AVR-Chat] Traffic?

2005-11-01 by Martin Jay McKee

>>No DLLs, VBruns, comms packages, or interpreters, just an .exe file

 

That's one advantage with C/C++... if you use static linking.  Any library
calls will be added to the executable and you can distribute the program
without any other files.

 

Martin Jay McKee

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.