Yahoo!
Groups Home - Yahoo! - Help



Welcome, roddonau (roddonau · simmstick_moderator@dontronics.com) Start a Group - My Groups - Account Info - Sign Out  
simmstick · SimmStick User Group Group Owner [ Edit My Membership ]
  Home  
* Messages  
     Pending  
     Post  
  Chat  
  Files  
  Photos  
  Links  
  Database  
  Polls  
  Members  
     Pending  
  Calendar  
 
 
  Promote  
  Invite  
 
 
  Management  
 
 
  owner = Owner 
  moderator = Moderator 
  online = Online 
 Messages Messages Help
Collapse Messages
 
  781-810 of 1612  |  Previous | Next  [ First | Last ]
 
 Msg #   Date  |  Thread
781

From: jc@trebutech.com
Date: Tue Jul 3, 2001 0:20am
Subject: Re: Dontronics raver not working

   
--- In simmstick@y..., Don McKenzie <don@d...> wrote:
> 
> 
> Richard John Cavell wrote:
> > 
> > On Tue, 26 Jun 2001, Don McKenzie wrote:
> > 
> > > again, did it run raver.bas when you first powered it up?
> > 
> > The 2313 that was installed originally runs a program that rotates
> > the LEDs.  I cannot change that program.  I cannot program 
raver.bas into
> > my other chips.
> 
> OK, at least this proves there is nothing wrong with the existing 
board.
> That is where i was trying to head.
> there can be so many things wrong, such as power/resonator, etc., 
etc.
> 
> > > If it is not another piece of hardware let go, then it will be 
in the
> > > configuration, or the cable.
> > > did you make a cable, or use one off the shelf?
> > 
> > I used two separate off the shelf parallel male-to-female (DB-25) 
cables.
> 
> have you checked that the 5 wires it needs are connected through?
> It may be a modem cable only, which may have 8 connections only, 
and it
> won't work. 
> 
> Have you checked your printer port settings in the hardware 
settings of
> your computer system?

Voila Don, I just tried my DT006 [Finally].  Gave it a few tries, 
wouldn't budge... Then I figured I better check these cables... 
couldn't find a continuity tester and doing by multimeter on the 
cable really sucks :)  Make a bigger mention of the cable thing on 
your webpage!  [Yes My cable doesn't have pins 4/11 going thru...the 
ones you need grrr]

Strangely..i checked the parallel settings first <SIGH>


   
ADVERTISEMENT


782

From: Don McKenzie  <don@dontronics.com>
Date: Tue Jul 3, 2001 1:20pm
Subject: Re: Finally!

   
Ian Su wrote:
> 
> The DT111 package arrived today, thanks very much for the machine pin
> sockets Don.
> 
> I soldered a socket onto the DT001 board, and tried to program the new F84
> with it, and it worked! So there must be something wrong with my DT101
> components, I wonder what.
> 
> I hope the same thing won't happen to my new DT111 board.
> 
> Ian.

Hope not Ian, as i said, it can be one of any number of things.
Just to reassure you, I would have sold several thousands of the
dt101/dt111 design, so I know there is nothing wrong there.

Don McKenzie    mailto:don@d...      http://www.dontronics.com

The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
783

From: Lodden, Fred  <fred.lodden@team.telstra.com>
Date: Tue Jul 3, 2001 5:43pm
Subject: RE: (unknown)

   
Don,

Thanks for the pointer as to the programmer configuration. I now have the
DT001 board happily programming away.

I am still working on the 24LC64 code. I found some more code snippets on
the PIClist so I will try some of those routines. It might take a while, but
I will get back to you and let you know how it turns out.

Thanks

Fred Lodden


	-----Original Message-----
	From:	Don McKenzie [SMTP:don@d...]
	Sent:	Friday, June 29, 2001 5:26 PM
	To:	simmstick@yahoogroups.com
	Subject:	Re: [simmstick] (unknown)



	"Lodden, Fred" wrote:
	> 
	>                 "Don't even bother reading or writing unless the
software
	> can find the port.  It is found through a simple looping back of
D0 to ACK I
	> think. I have a PC whose printer port never detects the
programmer.  I have
	> had to find an old parallel port card and install it as lpt2.
This card
	> works fine.   

	Hi Fred, yes it's a good idea to use a sacrificial plug in card
anyway.
	I have used one out of an XT for years. All chips socketed so I can
	replace thenm if I need to.

	I also have a laptop whose lpt port does not work with the
	> programmer, and I had to adjust the settings in the BIOS to get it
to work.

	snip...

	the dt001 will work with any old card, as it uses nothing fancy.

	> I have a couple of requests. I have just converted over to a new
computer
	> and in messing around with the programmer I altered some of the
hardware
	> settings. I now am unable to programme a PIC as I get a "verify
error on
	> Line 0". Can anyone tell me what the appropriate settings are for
Vdd, Vpp,
	> Output, Clock, Input and the Invert buttons to program a 16F84 on
a DT001
	> programming board. I had this application working on a previous
machine so I
	> know the DT001 programmer hardware is OK.

	It is set up in Bojan's software as the dt001, I think Nigel has
	something similar.
	it sure is mentioned on the dt001 page.

	> I have also in the past tried to program a 24LC64 in the EEPROM
socket on a
	> DT101. The code I have developed, is based on some modified
Microchip sample
	> code but only seems to write (or read, I am not sure where the bug
is
	> located) alternate locations in the EEPROM. I am using a DT206 LED
board to
	> provide indication of the data on the ports. Does anyone point me
towards
	> some simple PIC 16F84 assembler routines to read and write bytes
of data to
	> random locations in the 24LC64 EEPROM?

	you aren't using the 65 specs are you? The 64's are very different.

	Don McKenzie    mailto:don@d...
http://www.dontronics.com

	The World's Largest Range of Atmel/AVR  & PICmicro Hardware and
Software
	Free Basic Compiler and Programmer
http://www.dontronics.com/runavr.html
	The Little "rAVeR!" AVR & Basic Kit
http://www.dontronics.com/dt006.html

	To Post a message, send it to:   simmstick@e...

	To Unsubscribe, send a blank message to:
simmstick-unsubscribe@e... 

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

From: Don McKenzie  <don@dontronics.com>
Date: Tue Jul 3, 2001 5:55pm
Subject: Re: (unknown)

   
"Lodden, Fred" wrote:
> 
> Don,
> 
> Thanks for the pointer as to the programmer configuration. I now have the
> DT001 board happily programming away.
> 
> I am still working on the 24LC64 code. I found some more code snippets on
> the PIClist so I will try some of those routines. It might take a while, but
> I will get back to you and let you know how it turns out.
> 
> Thanks
> 
> Fred Lodden

sure Fred, I think I mentioned the piclist members may be able to assist
also.
You could end up with 10 different correct answers. Mind you, you could
also get 100 messages a day you don't really need, but the guys on the
list can be very good if you can keep up to the pace.
I sometimes do a search through the archives at:
http://www.infosite.com/%7Ejkeyzer/piclist/index.html

Don McKenzie    mailto:don@d...      http://www.dontronics.com

The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
785

From: Ian Su  <ians@student.unsw.edu.au>
Date: Tue Jul 3, 2001 6:21pm
Subject: Re: LED test program?

   
What's meant to happen with the LED walking test? I tested it before fully
soldering the DT111 components and the TX red/green LEDs would alternate,
but now it does nothing... have I stuffed up something again? I'm sure the
burn was successful...

Ian.
786

From: Ian Su  <ians@student.unsw.edu.au>
Date: Tue Jul 3, 2001 6:25pm
Subject: Oh wait

   
Oh wait... sorry ignore that last message.

If I set the oscillator to HS type it works again. Is HS the correct
oscillator type?

Ian.
787

From: Don McKenzie  <don@dontronics.com>
Date: Tue Jul 3, 2001 6:30pm
Subject: Re: Oh wait

   
Ian Su wrote:
> 
> Oh wait... sorry ignore that last message.
> 
> If I set the oscillator to HS type it works again. Is HS the correct
> oscillator type?

depends on what you choose to run it at. These are 4 modes on the 84a-20
If you have a 20mhz xtl connected, then yes.

Don McKenzie    mailto:don@d...      http://www.dontronics.com

The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
788

From: Don McKenzie  <don@dontronics.com>
Date: Thu Jul 5, 2001 9:44am
Subject: Dick Smith Hot Chip now works with Dontronics AVR software.

   
5-Jul-2001
ABC MAXI-Board (Hot Chip) Software.
The ABC Maxi Board Hot Chip (as supplied by Dick Smith Electronics
Australia) now works with Dontronics AVR software. 

Any software that uses the DT006 type of programming interface, will now
work with these Maxi-boards.
http://www.dontronics.com/abc.html

Don McKenzie    mailto:don@d...      http://www.dontronics.com

The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
789

From: Don McKenzie  <don@dontronics.com>
Date: Fri Jul 6, 2001 9:05am
Subject: SimmStick ethernet.

   
Subject: SimmStick ethernet.
        
CC: Tom Parker tp@w..., Dontronics Dealers 
(this is the last post to the old Dontronics Dealer list, new list now
fully operational.)
   
Posted with permission of Tom Parker

Don,

As I mentioned to you previously I've developed an Ethernet interface
for
the hc11 (see http://www.wiresncode.com/hc11/ether).  This is actually a
very
generic 8 bit Ethernet interface in a form factor that suits an hc11
development board.  Upon seeing the USB SimmStick, it occurred to me
that
the SimmStick platform could do with Ethernet too.

Since I mailed last I've done a prototype 2" SimmStick (TM) style board
with
the same components as the hc11 board.  This will be back next week.  I
plan
to populate it and test it cross wired to the hc11.  What I'm interested
in
is lending the working board (or selling the other unpopulated board at
cost
~$US9) to someone who has AVR experience to port the C code from the
hc11 to
the AVR.

It might also be possible to do a cut down ICMP only version for the
89C2051, I'll probably have a go at this.  The real problem here is that
once you interface the CS8900 to the 89C2051, there are very few pins
left
for IO.  The minimum would be 2, maybe 3 to so serial with
1-wire/I2C/SPI.

The Simmstick design attaches the 8 bit data bus directly to the D0-7. 
Five
other i/f pins (D8,D9,SCL,SDA,IO) are attached (through a DIP header for
isolation shunts) to a GAL.  Reset is also passed through the GAL for
possible inversion.  The GAL is then attached to a0-3, RD/WR, CS, IRQ,
Reset
of the CS8900.  The idea of this would be to shift into the GAL the
required
signals using a clock and data (ie. 2 pins + an enable).

So if anyone is keen (and able) to port the code (downloadable from the
above web site) to another platform let me know at tom@w... 
It
would need to stay GPL, I'm not sure about the future home of this
project.
It will stay open source (except the possibly PCB).  It is nearly
impossible
to home manufacture the PCB anyway (home soldering is ok) - the pin
pitch it
too fine for things like toner xfer (IMHO).  Depending on demand, long
term
Don or myself will probably produce PCBs cheaply.  The hc11 is looking
to be
around $US11 because of the small run I did (it is also considerably
bigger
so you get less per sheet), this would come down rapidly in larger
quantities and small size of the Simmstick board.  BTW this was my first
SMD
project, no-one should be intimidated by surface mount.
=====================

Please contact Tom directly if you have an interest, and he will make
arrangements.
Don...

Don McKenzie    mailto:don@d...      http://www.dontronics.com

The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
790

From: jc@trebutech.com
Date: Fri Jul 6, 2001 11:02am
Subject: Re: Dick Smith Hot Chip now works with Dontronics AVR software.

   
For those interested, you'll find that the HotChip (ABC Mini/Maxi) 
boards are sold much more cheaply by www.widget.com.au

---
Regards
John Chan @ Trebutech Dot Com
791

From: Jeff Barlow  <jeff@barlow.net>
Date: Fri Jul 6, 2001 11:16am
Subject: Re: SimmStick ethernet.

   
Why reinvent the wheel? See: http://liquorice.sourceforge.net/index.html


On Fri, 06 Jul 2001 09:05:03 +1000, Don McKenzie <don@d...>
wrote:

>Subject: SimmStick ethernet.

> What I'm interested in
>is lending the working board (or selling the other unpopulated board at
>cost
>~$US9) to someone who has AVR experience to port the C code from the
>hc11 to
>the AVR.
>
>
792

From: Alistair Riddell  <amr@alphalink.com.au>
Date: Thu Jul 12, 2001 0:54pm
Subject: 8515 problem

   
I have an 8515 that suddenly can be programmed.
Software reports that it is not in a reset state.

Anyone had any experience with this sort of problem?

The 8515 is mounted on a DT107 Rev A board (The board seems OK) and
programmed through a DT006.

The Programmer is uisp running under Linux.


Thanks.

Alistair Riddell
http://www.alphalink.com.au/~amr/
793

From: Alistair Riddell  <amr@alphalink.com.au>
Date: Thu Jul 12, 2001 0:57pm
Subject: Re: 8515 problem

   
Sorry about that. It should read can't.

Alistair Riddell wrote:
> 
> I have an 8515 that suddenly can be programmed.

-- 
Alistair Riddell
http://www.alphalink.com.au/~amr/
794

From: Don McKenzie  <don@dontronics.com>
Date: Sat Jul 14, 2001 10:03am
Subject: DT006 under linux

   
Subject:      Re: DT006 under linux
       Date:  Sun, 24 Jun 2001 17:06:42 +1000
      From:   Nathan Dunn <nathan@o...>
        To:   Don McKenzie <don@d...>
 References: 

On Thu, Jul 12, 2001 at 04:33:47PM +1000, Don McKenzie wrote:
> sure nathan, do you want me to post this message to the SimmStick group?

That would be great Don, I need as many testers as possable. I'm
allready
working on 0.02, including a method so that it will work for all flash
sizes
without detection. Just point them to the project page on sourceforge.

Thanks
-Nathan

> 
> please requote the message when you answer.
> 
> Cheers Don...
> 
> Nathan Dunn wrote:
> > 
> > G'day Don,
> > 
> > I've written a program to talk to AVR's under linux.
> > I used your DT006 board (well... my one, more corectly) for the testing
> > development. I was looking for people to do testing on difrent hardware etc
> > and I thought you could give me a hand. Not that I recomend giving this out
> > to all your coustermers just yet, it's only version 0.01 yet. :)
> > 
> > You are mensioned in the doco for LoadAVR, I thought you might like to know.
> > 
> > anyway... while this is not perhaps ready for the public I thought you could
> > take a look and tell your friends.
> > 
> > http://sourceforge.net/projects/loadavr/
> > 
> > Thanks
> > -Nathan
> > nathan@o...

Don McKenzie    mailto:don@d...      http://www.dontronics.com

The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
795

From: Ben Hitchcock  <benhi98@wollongong.apana.org.au>
Date: Sun Jul 15, 2001 1:19pm
Subject: Re: DT006 under linux

   
Hi,

If you want to use a serial port to program the DT006 inder linux, you
might try the following page:
http://www.omegav.ntnu.no/~jonah/el/

You will need a DT104 and an AT90S1200 with the ISPSimm program burnt in.  
You can get ISPSimm here:
http://www.dontronics.com/avr_232.html
If you ask Don really nicely, he might program an AT90S1200 with this
software as well, to enable you to 'bootstrap' your first AVR.  Once you
have one avr programmed with this software you can use it to program as
many others as you like.

I use this software all the time, with a DT003 + DT104.  In fact, I was so
happy with this software that I based MacAVRpa (a mac version of avrp) on
it :-)

i'm writing this on a laptop running RedHat 7, with a DT003 sitting beside
me :-)

Cheers,
Ben

> Subject:      Re: DT006 under linux
>        Date:  Sun, 24 Jun 2001 17:06:42 +1000
>       From:   Nathan Dunn <nathan@o...>
>         To:   Don McKenzie <don@d...>
>  References: 
> 
> On Thu, Jul 12, 2001 at 04:33:47PM +1000, Don McKenzie wrote:
> > sure nathan, do you want me to post this message to the SimmStick group?
> 
> That would be great Don, I need as many testers as possable. I'm
> allready
> working on 0.02, including a method so that it will work for all flash
> sizes
> without detection. Just point them to the project page on sourceforge.
> 
> Thanks
> -Nathan
> 
> > 
> > please requote the message when you answer.
> > 
> > Cheers Don...
> > 
> > Nathan Dunn wrote:
> > > 
> > > G'day Don,
> > > 
> > > I've written a program to talk to AVR's under linux.
> > > I used your DT006 board (well... my one, more corectly) for the testing
> > > development. I was looking for people to do testing on difrent hardware etc
> > > and I thought you could give me a hand. Not that I recomend giving this out
> > > to all your coustermers just yet, it's only version 0.01 yet. :)
> > > 
> > > You are mensioned in the doco for LoadAVR, I thought you might like to know.
> > > 
> > > anyway... while this is not perhaps ready for the public I thought you could
> > > take a look and tell your friends.
> > > 
> > > http://sourceforge.net/projects/loadavr/
> > > 
> > > Thanks
> > > -Nathan
> > > nathan@o...
> 
> Don McKenzie    mailto:don@d...      http://www.dontronics.com
> 
> The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
> Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
> The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
> 
> 
> To Post a message, send it to:   simmstick@e...
> 
> To Unsubscribe, send a blank message to: simmstick-unsubscribe@e... 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>
796

From: Ben Hitchcock  <benhi98@wollongong.apana.org.au>
Date: Mon Jul 16, 2001 8:59am
Subject: Re: DT006 under linux

   
I don't know if this will help much, but Steven Bolt has a parallel port
programmer working under linux as well:
http://www.xs4all.nl/~sbolt/e-spider_prog.html#programmer

The code is available under the GPL, so you can probably steal *ahem* have
a look at the code that is already there.

Good luck,

Ben

> Subject:      Re: DT006 under linux
>        Date:  Sun, 24 Jun 2001 17:06:42 +1000
>       From:   Nathan Dunn <nathan@o...>
>         To:   Don McKenzie <don@d...>
>  References: 
> 
> On Thu, Jul 12, 2001 at 04:33:47PM +1000, Don McKenzie wrote:
> > sure nathan, do you want me to post this message to the SimmStick group?
> 
> That would be great Don, I need as many testers as possable. I'm
> allready
> working on 0.02, including a method so that it will work for all flash
> sizes
> without detection. Just point them to the project page on sourceforge.
> 
> Thanks
> -Nathan
> 
> > 
> > please requote the message when you answer.
> > 
> > Cheers Don...
> > 
> > Nathan Dunn wrote:
> > > 
> > > G'day Don,
> > > 
> > > I've written a program to talk to AVR's under linux.
> > > I used your DT006 board (well... my one, more corectly) for the testing
> > > development. I was looking for people to do testing on difrent hardware etc
> > > and I thought you could give me a hand. Not that I recomend giving this out
> > > to all your coustermers just yet, it's only version 0.01 yet. :)
> > > 
> > > You are mensioned in the doco for LoadAVR, I thought you might like to know.
> > > 
> > > anyway... while this is not perhaps ready for the public I thought you could
> > > take a look and tell your friends.
> > > 
> > > http://sourceforge.net/projects/loadavr/
> > > 
> > > Thanks
> > > -Nathan
> > > nathan@o...
> 
> Don McKenzie    mailto:don@d...      http://www.dontronics.com
> 
> The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
> Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
> The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
> 
> 
> To Post a message, send it to:   simmstick@e...
> 
> To Unsubscribe, send a blank message to: simmstick-unsubscribe@e... 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>
797

From: Ray Bright  <rbright@icenet.com.au>
Date: Sat Jul 21, 2001 11:19pm
Subject: Can't run a LCD off a DT006

   

I've assembled my Raver DT006 & it works as expected without any problems but I'm having a problem interfacing to a 2 x 16 LCD. Following the BASCOM AVR manual page 54 I've got it wired up ok and I've been able to run the LCD.BAS example on page 140 in simulate mode just fine but when I go to download it to the 2313 with a LCD connected it downloads OK but I can't get the LCD to work. Is there any common DT006 to LCD problem that I should be looking at.
I've tried inserting a $crystal = 4000000 in the code and putting 10K pullups on the unused D4-D7, still won't work
 
Appreciate any help...
798

From: Brian Gracia  <bgracia@telocity.com>
Date: Sun Jul 22, 2001 2:01pm
Subject: DT001 programmer not working now

   
Hello,

I have a DT001 programmer and had it working a few months ago.  I had to 
put my hobbies away in lue of work related problems.  I just pulled it out 
of the box I keep it in, and hooked it up and the PicAll software cannot 
find the programmer.

For trouble shooting purposes, I am and have been running Windows 2000.  I 
installed a extra printer card just for use with the DT001.  This setup has 
worked before with the DT001.
One of the problems I get is that all four LEDs are on and won't go 
off.  Now I know that 2 of them are power indicators, but the others are 
programmer voltage indicators.

I get the following error when trying to run the PicAllW software:
	Couldn't start IO driver for Windows Nt/2000
	For running PICALLW under Windows NT/2000
	you must have administrator privilege in order
	to install and start IO driver.

I am the only user of this home computer, so I have never needed 
Administrator privileges before to run the PICALLW software before.  What 
gives, any help guys.  I need to get up and running today.

Thanks,
Brian Gracia
799

From: Brian Gracia  <bgracia@telocity.com>
Date: Sun Jul 22, 2001 2:18pm
Subject: Re: DT001 programmer not working now

   
Well, I just got the programmer working, although maybe not 100%.  I 
reverted to PICALLW version 7 and selected the DT001 Settings and 
everything seems to be working. I can read a chip, although I cannot erase 
the one in the programmer, PICALLW give me an error.  I will find some of 
my other 16F84's and try another.  Hope it is just the chip.

I do however keep getting the IO Admin error.  Not sure whats up with that, 
so if anyone has any suggestions, please help.

Thanks,
Brian Gracia
800

From: Don McKenzie  <don@dontronics.com>
Date: Sun Jul 22, 2001 5:08pm
Subject: Re: DT001 programmer not working now

   
Brian Gracia wrote:
> 
> Well, I just got the programmer working, although maybe not 100%.  I
> reverted to PICALLW version 7 and selected the DT001 Settings and
> everything seems to be working. I can read a chip, although I cannot erase
> the one in the programmer, PICALLW give me an error.  I will find some of
> my other 16F84's and try another.  Hope it is just the chip.
> 
> I do however keep getting the IO Admin error.  Not sure whats up with that,
> so if anyone has any suggestions, please help.
> 
> Thanks,
> Brian Gracia

I don't run 2000 Brian, but Bojan the author is very receptive to all
questions.

>Couldn't start IO driver for Windows Nt/2000
>For running PICALLW under Windows NT/2000

suggest you combine the outcome of both of your messages and try him at:
Bojan Dobaj <bojan.dobaj@b...>

Also have a read throught the assembly instructions for correct LED
operation.

Don McKenzie    mailto:don@d...      http://www.dontronics.com

The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
801

From: Don McKenzie  <don@dontronics.com>
Date: Sun Jul 22, 2001 5:11pm
Subject: Re: Can't run a LCD off a DT006

   
> Ray Bright wrote:
> 
> I've assembled my Raver DT006 & it works as expected without any
> problems but I'm having a problem interfacing to a 2 x 16 LCD.
> Following the BASCOM AVR manual page 54 I've got it wired up ok and
> I've been able to run the LCD.BAS example on page 140 in simulate mode
> just fine but when I go to download it to the 2313 with a LCD
> connected it downloads OK but I can't get the LCD to work. Is there
> any common DT006 to LCD problem that I should be looking at.
> I've tried inserting a $crystal = 4000000 in the code and putting 10K
> pullups on the unused D4-D7, still won't work

It is a standard LCD, not one of the ones that need a negative bias
voltage? 
No, you don't need pullup resistors

The bascom group may also be able to help also Ray.
no real tricks to it, as long as you connect up and configure the pins
correctly.

Don McKenzie    mailto:don@d...      http://www.dontronics.com

The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
802

From: Ray Bright  <rbright@icenet.com.au>
Date: Mon Jul 23, 2001 10:09pm
Subject: Re: Can't run a LCD off a DT006

   
Thanks for the response Don..... The problem occurs with both a Dick Smith 2
x 16 LCD (catalog Z4170) and a 2 x 40 Sharp LM402-55. I don't know about the
negative bias issue voltage issue, perhaps you could inform me further.
In desperation to prove the LCDs are not "blown" I tried the Printer port to
LCD hardware & software set up off wttp://ee.cleversoul.com/lcd_project.html
and both worked fine.
Really pulling out my hair on this one ....... Hope you or someone else can
help further

----- Original Message -----
From: "Don McKenzie" <don@d...>
To: <simmstick@yahoogroups.com>
Sent: Sunday, July 22, 2001 3:11 PM
Subject: Re: [simmstick] Can't run a LCD off a DT006


>
>
> > Ray Bright wrote:
> >
> > I've assembled my Raver DT006 & it works as expected without any
> > problems but I'm having a problem interfacing to a 2 x 16 LCD.
> > Following the BASCOM AVR manual page 54 I've got it wired up ok and
> > I've been able to run the LCD.BAS example on page 140 in simulate mode
> > just fine but when I go to download it to the 2313 with a LCD
> > connected it downloads OK but I can't get the LCD to work. Is there
> > any common DT006 to LCD problem that I should be looking at.
> > I've tried inserting a $crystal = 4000000 in the code and putting 10K
> > pullups on the unused D4-D7, still won't work
>
> It is a standard LCD, not one of the ones that need a negative bias
> voltage?
> No, you don't need pullup resistors
>
> The bascom group may also be able to help also Ray.
> no real tricks to it, as long as you connect up and configure the pins
> correctly.
>
> Don McKenzie    mailto:don@d...      http://www.dontronics.com
>
> The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
> Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
> The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
>
> To Post a message, send it to:   simmstick@e...
>
> To Unsubscribe, send a blank message to: simmstick-unsubscribe@e...
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
803

From: Don McKenzie  <don@dontronics.com>
Date: Tue Jul 24, 2001 4:49pm
Subject: Re: Can't run a LCD off a DT006

   
Ray Bright wrote:
> 
> Thanks for the response Don..... The problem occurs with both a Dick Smith 2
> x 16 LCD (catalog Z4170) and a 2 x 40 Sharp LM402-55. I don't know about the
> negative bias issue voltage issue, perhaps you could inform me further.

In that case, I doubt that they are a negative bias type if DS is
selling them as a cat number.

> In desperation to prove the LCDs are not "blown" I tried the Printer port to
> LCD hardware & software set up off wttp://ee.cleversoul.com/lcd_project.html
> and both worked fine.
> Really pulling out my hair on this one ....... Hope you or someone else can
> help further

OK, then perhaps you better try the bascom group. You will find details
at:
http://www.dontronics.com/chat.html

Sorry, i don't have first hand knowledge of bascom and the LCD usage.

Don McKenzie    mailto:don@d...      http://www.dontronics.com

The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
804

From: Ben Hitchcock  <ben@wollongong.apana.org.au>
Date: Wed Jul 25, 2001 8:39am
Subject: Re: Can't run a LCD off a DT006

   
Hi Ray,

I've been using the Dick Smith 2x16 LCD for a while, and there are some 
tricks you have to be aware of.  At the bottom of this email is a sample 
program (written in assembler, which is why I held off writing earlier), 
and attached is the compiled .hex file.

Number one is to make sure you get the power supply working properly.  
This might not be a problem with your raver, but I certainly had 
problems until I put a whopping big 10000 uF capacitor across the supply 
rails.  Now when you turn the power off the LCD stays working for a 
couple of seconds, which shows how much reserve it has against noisy 
power supplies.

Number two is to wait for a while (100 msec or so) after power-on before 
trying to talk to the LCD.  This seemed to help my system a lot.

Number three is to do the initial power on procedure, and set the LCD to 
turn the insertion point on, and make it blink.  When the LCD blinks at 
you, you're nearly there...

Then you should be set.  Look through my code, and download it to your 
AVR.  I know that this code works, but it is an earlier version to the 
one I'm working on now... trust me you don't want the version that talks 
to the LCD through some shift registers ;-)

For the Dick Smith module,
Connect LCD pins 7-14 to PORTB 0-7.
Connect LCD pin 6 to PORTD 6
Connect LCD pin 5 to ground.
Connect LCD pin 4 to PORTD 5.
Connect LCD pin 3 to the wiper of a 10k pot, the other ends of the pot 
go to +5V and ground.
Connect LCD pin 2 to +5V
Connect LCD pin 1 to ground.
Attachment: [not stored]
Attachment: (audio/x-mpegurl) LCD_8wire8.hex [not stored]
Good luck,

Ben Hitchcock

------
;***********************************************************
;'
; LCD tacho, for use on automotive systems.
;
; This code is copyright 15/5/2000 Ben Hitchcock.
;  Feel free to use it however you see fit!
;
;***********************************************************
; Definitions
;*************
.include "2313def.inc"
.device AT90S2313


.equ  rev_limit   =130  ; 13000 rpm.
.equ  shift_limit =110  ; 11000 rpm.

.def    delay    	=r16    ;temporary register
.def    delay1   	=r17
.def    delay2   	=r18    ;temporary register
.equ     RSPin    =6       ;Bit 6
.equ     EPin     =5       ;Bit 5

.equ     cutoff   =3       ;Bit 3
.equ	    shift_light  =2		     ;Bit 2
.def    temp    	=r19      ;temporary register
.def    temp_1  	=r20
.def    digit    =r24      ; temp storage for display RPM routine
.def    temp_2 		=r21      ;temporary register
.def     character   =r22  ; character to put on LCD
.def     counter     =r22  ; value of counter
.def     displayPos  =r22  ; position to go to on the display
.def	    temp_3		=r23
.def     rpm      =r25     ; Current rpm of the engine
.def     portDbase   =r26  ; Pins that should be set in portD

;******************************
; Code
;******
.cseg

.org 0

RESET:
	     rjmp	START		; Reset vector bypass subroutines
	reti
	reti
	reti
	reti
	reti
	reti
	reti
	reti
	reti
	reti

	


;*************************************************************************
; Display setup
; Port D        bit             3       OE      Enable - clocks on neg 
transition
;                               2       RS      Register Select
;                                       command=0, data=1
;               bits    4-7     data    4 bits, high nibble first
;                                       ASCII format
;               RW grounded (write)
; Note that some commands take up to 1.6 msec for display to implement
; at a nominal display clock rate of 250 KHz
; Display initialize routine after power up
;
;************************************************************************
;

START:
          ldi r16,RAMEND      ;Init Stack Pointer (only needed for 2313)
          out SPL,r16


         ldi    temp,0b00000000 	; Start up with no outputs asserted.
         out    PORTD,temp
         ldi    temp, 0b00000000  ; None on portb either...
         out    PORTB, temp

         ldi     temp,0b11111111
         out     DDRB,temp	    ; PORTB = all outputs.
         ldi    temp, 0b11101111
         out    DDRD, temp     ; PORTD - RS, RW, and E.

	ldi     portDbase, 0b00000000  ; Make sure the shift light and
								; rev limiter don't fire.

         ldi temp, 0b00000111;
         out TCCR0, temp
                                  ;Load 1's into the Timer control 
register, to
                                  ; enable the timer, and make it trigger 
on a
                                  ; rising edge signal.
                                  ; Now TCNT0 contains the value of the 
number of
                                  ; double revolutions that happened 
since we last
                                  ; reset the timer.
	ldi temp, 0b00001110;

	wdr					; Reset the watchdog.
	out WDTCR, temp			; Enable the watchdog timer.  This setting is about
						; 1 second at 5V.
	wdr					; Reset the watchdog again...


          ldi temp, 0b00100001    ; Start the counter at something 
vaguely appropriate
          out TCNT0, temp


;
	ldi	temp,50			; Wait before turning on display.
D1:					;
	rcall	WAIT_2msec		;
  	rcall WAIT_2msec;
	rcall WAIT_2msec;
	dec	temp
	brne	D1

         out	portD, portDbase	;

	ldi	temp,30			; Wait at least 15msec after
D2:					; powerup before writing
	rcall	WAIT_2msec		; to display
  	rcall WAIT_2msec;
	rcall WAIT_2msec;
	dec	temp
	brne	D2


	wdr					; Reset the watchdog;

         ldi    temp,0b00000000 	; Function set
         or     temp, portDbase         ; assert the pins that need it.
         out    PORTD,temp
         ldi    temp, 0b00111000  ; 2 line mode, 5x8 font
         out    PORTB, temp
         sbi    PORTD, EPIN       ; Enable transfer
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
       rcall WAIT_2msec;
         cbi    PORTD, EPIN       ; clock transfer.
          rcall WAIT_2msec

         ldi    temp,0b00000000 	; Display ON/OFF
         or     temp, portDbase         ; assert the pins that need it.
         out    PORTD,temp
;        ldi    temp, 0b00001111  ; display on, cursor on, blink on
         ldi    temp, 0b00001100  ; display on, cursor off, blink off
         out    PORTB, temp
         sbi    PORTD, EPIN       ; Enable transfer
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
       rcall WAIT_2msec;
         cbi    PORTD, EPIN       ; clock transfer.
         rcall WAIT_2msec

         ldi    temp,0b00000000 	; Display Clear
         or     temp, portDbase         ; assert the pins that need it.
         out    PORTD,temp
         ldi    temp, 0b00000001  ; clear display
         out    PORTB, temp
         sbi    PORTD, EPIN       ; Enable transfer
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
       rcall WAIT_2msec;
         cbi    PORTD, EPIN       ; clock transfer.
         rcall WAIT_2msec

         ldi    temp,0b00000000 	; Entry mode set
         or     temp, portDbase         ; assert the pins that need it.
         out    PORTD,temp
         ldi    temp, 0b00000111  ; increment mode, entire shift on
         out    PORTB, temp
         sbi    PORTD, EPIN       ; Enable transfer
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
       rcall WAIT_2msec;
         cbi    PORTD, EPIN       ; clock transfer.
       rcall WAIT_2msec;


;        ldi     temp,0b00001100 	; Display on, cursor/blink on
;        rcall   COMMAND_DISPLAY

  ;       ldi temp, 0b
;


;*************************************************************************
*******
;*************************************************************************
*******
;***                               MAIN 
LOOP:                                 ***
;*************************************************************************
*******
;*************************************************************************
*******
ENDLOOP:



    wdr					 	; Reset the watchdog.

    ldi   temp, 0          ; Reset counter
    out   TCNT0, temp      ; Send 0 to counter

                            ; Now wait until the counter increments, or 
we run out of patience...
    ldi   temp, 0xFF        ;
    ldi   temp_2, 0          ; So we can compare TCNT0 with 0.
WAITLOOP1:
    ldi   temp_1, 0xFF      ;
WAITLOOP2:
    in counter, TCNT0       ; Input the value of the counter
    cp   temp_2, counter     ; Compare the counter to 0.
    brlo  STARTTIMING       ; If the counter isn't 0, then we've got to 
start timing!
    dec   temp_1            ; Decrement temp_1
    brne  WAITLOOP2         ; Try again.
    dec   temp              ; Decrease our outside loop
    brne  WAITLOOP1         ; We're still trying...


    ldi   rpm, 0            ; Give up - set the rpm to 0.
    rjmp  ENDTIMING         ; Go to the rest of the loop.

STARTTIMING:

    rcall WAIT_2msec        ; Twiddle thumbs, waiting for engine to do a 
revolution
    ldi   rpm, 150          ; Start at 15000 rpm.
    ldi   temp_2, 1          ; So we can compare TCNT0 with 1.

rpm15000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter    ; Compare the counter with the value '1'.
    brlo  BRIDGE            ; If the counter > 1 then finish.
    rcall WAIT_15usec       ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 141          ; compare RPM to 14100 rpm...
    brsh  rpm15000          ; If same or higher then keep counting.

rpm14000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  BRIDGE            ; If the counter > 1 then finish.
    rcall WAIT_17usec       ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 131          ; compare RPM to 13100 rpm...
    brsh  rpm14000          ; If same or higher then keep counting.


rpm13000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  BRIDGE            ; If the counter > 1 then finish.
    rcall WAIT_19usec       ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 121          ; compare RPM to 12100 rpm...
    brsh  rpm13000          ; If same or higher then keep counting.

rpm12000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  BRIDGE            ; If the counter > 1 then finish.
    rcall WAIT_23usec       ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 111          ; compare RPM to 11100 rpm...
    brsh  rpm12000          ; If same or higher then keep counting.

rpm11000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  BRIDGE            ; If the counter > 1 then finish.
    rcall WAIT_28usec       ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 101          ; compare RPM to 10100 rpm...
    brsh  rpm11000          ; If same or higher then keep counting.

rpm10000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  BRIDGE            ; If the counter >= 2 then finish.
    rcall WAIT_34usec       ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 91           ; compare RPM to 9100 rpm...
    brsh  rpm10000          ; If same or higher then keep counting.

rpm9000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  BRIDGE            ; If the counter >= 2 then finish.
    rcall WAIT_42usec       ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 81           ; compare RPM to 8100 rpm...
    brsh  rpm9000           ; If same or higher then keep counting.

    rjmp rpm8000
BRIDGE:
    rjmp ENDTIMING

rpm8000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  ENDTIMING         ; If the counter >= 2 then finish.
    rcall WAIT_54usec       ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 71           ; compare RPM to 7100 rpm...
    brsh  rpm8000           ; If same or higher then keep counting.

rpm7000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  ENDTIMING         ; If the counter >= 2 then finish.
    rcall WAIT_72usec       ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 61           ; compare RPM to 6100 rpm...
    brsh  rpm7000           ; If same or higher then keep counting.

rpm6000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  ENDTIMING         ; If the counter >= 2 then finish.
    rcall WAIT_100usec      ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 51           ; compare RPM to 5100 rpm...
    brsh  rpm6000           ; If same or higher then keep counting.

rpm5000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  ENDTIMING         ; If the counter >= 2 then finish.
    rcall WAIT_150usec      ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 41           ; compare RPM to 4100 rpm...
    brsh  rpm5000           ; If same or higher then keep counting.

rpm4000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  ENDTIMING         ; If the counter >= 2 then finish.
    rcall WAIT_250usec      ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 31           ; compare RPM to 3100 rpm...
    brsh  rpm4000           ; If same or higher then keep counting.

rpm3000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  ENDTIMING         ; If the counter >= 2 then finish.
    rcall WAIT_500usec      ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 21          ; compare RPM to 2100 rpm...
    brsh  rpm3000          ; If same or higher then keep counting.

rpm2000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  ENDTIMING         ; If the counter >= 2 then finish.
    rcall WAIT_1500usec     ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm, 11           ; compare RPM to 1100 rpm...
    brsh  rpm2000           ; If same or higher then keep counting.

rpm1000:
    in    counter, TCNT0    ; Input the value of the counter
    cp    temp_2, counter   ; Compare the counter with the value '1'.
    brlo  ENDTIMING         ; If the counter >= 2 then finish.
    rcall WAIT_6000usec     ; Wait a bit...
    dec   rpm               ; Decrease rpm by 1
    cpi   rpm,  1           ; compare RPM to 100 rpm...
    brsh  rpm1000           ; If same or higher then keep counting.

rjmp ENDLOOP

ENDTIMING:

    ldi   displayPos, 21       ; start at address 21
    rcall CLEAR_DISPLAY

    ldi   character, 0b01010101;   U
    rcall DATA_DISPLAY;
    ldi   character, 0b01001111;   O
    rcall DATA_DISPLAY;
    ldi   character, 0b01010111;   W

    rcall DATA_DISPLAY;
    ldi   character, 0b00100000;
    rcall DATA_DISPLAY;
    ldi   character, 0b01010010;   R
    rcall DATA_DISPLAY;
    ldi   character, 0b01100001;   a
    rcall DATA_DISPLAY;
    ldi   character, 0b01100011;   c
    rcall DATA_DISPLAY;
    ldi   character, 0b01101001;   i
    rcall DATA_DISPLAY;
    ldi   character, 0b01101110;   n
    rcall DATA_DISPLAY;
    ldi   character, 0b01100111;   g
    rcall DATA_DISPLAY;
    ldi   displayPos, 86       ; start at address 75
    rcall SET_POSITION
    rcall DISPLAY_RPM
    ldi   character, 0b00110000;   0
    rcall DATA_DISPLAY;
    ldi   character, 0b00110000;   0
    rcall DATA_DISPLAY;
    ldi   character, 0b01110010;   r
    rcall DATA_DISPLAY;
    ldi   character, 0b01110000;   p
    rcall DATA_DISPLAY;
    ldi   character, 0b01101101;   m
    rcall DATA_DISPLAY;
;  rcall CLEAR_DISPLAY;
;   in   character, TCNT0     ; Our timer/counter
;   rcall DATA_DISPLAY;


    cpi   rpm, rev_limit          ; Is the rpm too high?
    brsh  limit_engine            ; If so, then stop the ignition

    cbi   PORTD, cutoff           ; Otherwise, let the engine run.
    cbr   portDbase, (1 << cutoff); Save the base portd pins
    rjmp  check_shift_light       ; Skip the cutoff part


limit_engine:
    sbi   PORTD, cutoff           ; Turn off the engine
    sbr   portDbase, (1 << cutoff); Save the base portd pins

check_shift_light:
    cpi 	 rpm, shift_limit		 ; Is the rpm high enough to shift?
    brsh	 set_shift_light	     ; If so, then light up the shift light

    cbi   PORTD, cutoff           ; Otherwise, turn off the shift light.
    cbr   portDbase, (1 << shift_light); Save the base portd pins
    rjmp  rest_of_main_loop       ; Skip the shift light part part

set_shift_light:
    sbi   PORTD, shift_light           ; Turn on the light
    sbr   portDbase, (1 << shift_light); Save the base portd pins


rest_of_main_loop:

	ldi	temp,25  	; Wait a small amount before starting again
end1:					;
	rcall	WAIT_2msec		; to display
	dec	temp
	brne	end1

rjmp	ENDLOOP
;   in   rpm, TCNT0     ; Our timer/counter
;   ldi   temp, 0          ; Reset counter
;   out   TCNT0, temp      ; Send 0 to counter





;************************************************
;                   Subroutines
;************************************************
;
;
;************************************************
;           Display RPM
;
;  Loads the value of the timer into the LCD.
;  The frequency at which you call this subroutine
;  determines the time base of the counter.
;************************************************
DISPLAY_RPM:

    mov   temp_1, rpm       ; let the rest of the routine know the rpm.

    ldi   digit, 0       ; Start at zero
display_rpm_hundreds:

    mov   temp_2, temp_1   ; load the number into temp_1
    subi  temp_2,  100   ; Subtract 100 from the number.

    brmi  send_hundreds_to_lcd ; If the result is less than 0, then
                            ; skip the next bit.
    inc   digit          ; Add 1 to digit.
    mov  temp_1, temp_2    ; Decrease temp by 100.
    rjmp  display_rpm_hundreds ; Now do the loop again.

send_hundreds_to_lcd:
    ori   digit, 0b00110000 ; Make the digit into something the
                            ; LCD understands.
    mov   character, digit  ;  Let the rest of the program know
                            ; what's going on
    rcall DATA_DISPLAY;

    ldi   digit, 0       ; Start at zero
    mov   temp_2, temp_1   ; load the number into temp_1

display_rpm_tens:

    subi  temp_2,  10   ; Subtract 10 from the number.

    brmi  send_tens_to_lcd ; If the result is less than 0, then
                            ; skip the next bit.
    inc   digit          ; Add 1 to digit.
    mov  temp_1, temp_2    ;
    rjmp  display_rpm_tens ; Now do the loop again.

send_tens_to_lcd:
    ori   digit, 0b00110000 ; Make the digit into something the
                            ; LCD understands.
    mov   character, digit  ;  Let the rest of the program know
                            ; what's going on
    rcall DATA_DISPLAY;

send_ones_to_lcd:
    ori   temp_1, 0b00110000 ; Make the digit into something the
                            ; LCD understands.
    mov   character, temp_1  ;  Let the rest of the program know
                            ; what's going on
    rcall DATA_DISPLAY;

    ret;

;
;
;******************************************************
;
; Writes data to display
; incorporates 50 usec delay
; data in temp
;
;********************************************************
CLEAR_DISPLAY:

         mov     temp_1,character     ; Copy data to temp_1

;          ldi    temp,0b00100000 	; Return Home
           ldi    temp,0b00000000 	; Return Home
         or     temp, portDbase         ; assert the pins that need it.
         out    PORTD,temp
         ldi    temp, 0b00000010  ; Return home
         out    PORTB, temp
         sbi    PORTD, EPIN       ; Enable transfer
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
       rcall WAIT_2msec;
       rcall WAIT_2msec;  Extra
         cbi    PORTD, EPIN       ; Disable transfer

       rcall WAIT_2msec;
SET_POSITION:
       rcall WAIT_2msec;   Extra
        ldi    temp,0b00000000 	; Set DD Address
         or     temp, portDbase         ; assert the pins that need it.
         out    PORTD,temp
         ldi    temp, 0b10000000  ; Set address
         or    temp, displayPos  ; Load address into temp.
         out    PORTB, temp
         sbi    PORTD, EPIN       ; Enable transfer
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
       rcall WAIT_2msec;
       rcall WAIT_2msec;
         cbi    PORTD, EPIN       ; Disable transfer

       rcall WAIT_2msec;
       rcall WAIT_2msec;

       ret;

  DATA_DISPLAY:


        ldi    temp,0b01000000 	; Write to data RAM
         or     temp, portDbase         ; assert the pins that need it.
         out    PORTD,temp
         out    PORTB, character
         sbi    PORTD, EPIN       ; Enable transfer
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         nop                             ; Data write cycle must be 
 >1000usec
         nop
         cbi    PORTD, EPIN    ; Disable transfer


         ldi     Delay,100       ; Wait about 50 usec
D5:
          nop;
	dec     Delay
         brne    D5
;
         ret     ; return









;*********************************************************************
; Delay 2 msec with a 4MHz clock
;*********************************************************************
WAIT_2msec:
          ldi     Delay1,$0B         ; Slower this way
D20002:
         ldi     Delay2,$F4
D20001:

         dec     Delay2
         brne    D20001
         dec     Delay1
         brne    D20002

         ret


;*********************************************************************
; Delay 0.0145 msec with a 4MHz clock  (15-14)
;*********************************************************************
WAIT_15usec:
         ldi     Delay1,$0E
testDelay:
         dec     Delay1
         brne    testDelay

         ret

;*********************************************************************
; Delay 0.0165 msec with a 4MHz clock  (14-13)
;*********************************************************************
WAIT_17usec:
         ldi     Delay1,$11
         rjmp   testDelay;

;*********************************************************************
; Delay 0.019 msec with a 4MHz clock (13-12)
;*********************************************************************
WAIT_19usec:
          nop;
          nop;  // For tuning...
         ldi     Delay1,$15
         rjmp   testDelay;

;*********************************************************************
; Delay 0.0225 msec with a 4MHz clock (12-11)
;*********************************************************************
WAIT_23usec:
         ldi     Delay1,$19
         rjmp   testDelay;

;*********************************************************************
; Delay 0.0275 msec with a 4MHz clock (11-10)
;*********************************************************************
WAIT_28usec:
         ldi     Delay1,$20
         rjmp   testDelay;

;*********************************************************************
; Delay 0.0335 msec with a 4MHz clock (10-9)
;*********************************************************************
WAIT_34usec:
         ldi     Delay1,$29
         rjmp   testDelay;

;*********************************************************************
; Delay 0.0415 msec with a 4MHz clock (9-8)
;*********************************************************************
WAIT_42usec:
         ldi     Delay1,$33       ; (Was 34)
         rjmp   testDelay;

;*********************************************************************
; Delay 0.0535 msec with a 4MHz clock (8-7)
;*********************************************************************
WAIT_54usec:
         ldi     Delay1,$44
         rjmp   testDelay;

;*********************************************************************
; Delay 0.0715 msec with a 4MHz clock (7-6)
;*********************************************************************
WAIT_72usec:
         ldi     Delay1,$5B
         rjmp   testDelay;

;*********************************************************************
; Delay 0.1 msec with a 4MHz clock (6-5)
;*********************************************************************
WAIT_100usec:
         ldi    Delay2, $01
D01001:
         ldi     Delay1,$7F
         rcall   testDelay; // Rcall (not rjmp) so it returns to us
         dec    Delay2;
         brne   D01001;
         ret;

;*********************************************************************
; Delay 0.15 msec with a 4MHz clock (5-4)
;*********************************************************************
WAIT_150usec:
         ldi    Delay2, $01
D01501:
         ldi     Delay1,$BE
         rcall   testDelay; // Rcall (not rjmp) so it returns to us
         dec    Delay2;
         brne   D01501;
         ret;

;*********************************************************************
; Delay 0.25 msec with a 4MHz clock (4-3)
;*********************************************************************
WAIT_250usec:
         ldi    Delay2, $05
D02501:
         ldi     Delay1,$3F
         rcall   testDelay; // Rcall (not rjmp) so it returns to us
         dec    Delay2;
         brne   D02501;
         ret;

;*********************************************************************
; Delay 0.5 msec with a 4MHz clock (3-2)
;*********************************************************************
WAIT_500usec:
         ldi    Delay2, $05
D05001:
         ldi     Delay1,$86
         rcall   testDelay; // Rcall (not rjmp) so it returns to us
         dec    Delay2;
         brne   D05001;
         ret;

;*********************************************************************
; Delay 1.5 msec with a 4MHz clock (2-1)
;*********************************************************************
WAIT_1500usec:
         ldi    Delay2, $0F
D15001:
         ldi     Delay1,$8E ; (Was 80)
         rcall   testDelay; // Rcall (not rjmp) so it returns to us
         dec    Delay2;
         brne   D15001;
         ret;

;*********************************************************************
; Delay 6.0 msec with a 4MHz clock (1-0)
;*********************************************************************
WAIT_6000usec:
         ldi    Delay2, $3C
D60001:
         ldi     Delay1,$80
         rcall   testDelay; // Rcall (not rjmp) so it returns to us
         dec    Delay2;
         brne   D60001;
         ret;






;*********************************************************************
; Delay 4 msec with a 4MHz clock
;*********************************************************************
WAIT_4msec:
          ldi     Delay1,$15         ; Slower this way
D40002:
         ldi     Delay2,$FA
D40001:

         dec     Delay2
         brne    D40001
         dec     Delay1
         brne    D40002

         ret


;*********************************************************************
; Delay 0.029 msec with a 4MHz clock
;*********************************************************************
WAIT_29usec:
         ldi     Delay1,$1C
         rjmp   testDelay;

         ret

;*********************************************************************
; Delay 0.033 msec with a 4MHz clock
;*********************************************************************
WAIT_33usec:
         ldi     Delay1,$28
         rjmp   testDelay;

;*********************************************************************
; Delay 0.038 msec with a 4MHz clock
;*********************************************************************
WAIT_38usec:
         ldi     Delay1,$2F
         rjmp   testDelay;

;*********************************************************************
; Delay 0.045 msec with a 4MHz clock
;*********************************************************************
WAIT_45usec:
         ldi     Delay1,$38
         rjmp   testDelay;

;*********************************************************************
; Delay 0.055 msec with a 4MHz clock
;*********************************************************************
WAIT_55usec:
         ldi     Delay1,$45
         rjmp   testDelay;

;*********************************************************************
; Delay 0.067 msec with a 4MHz clock
;*********************************************************************
WAIT_67usec:
         ldi     Delay1,$55
         rjmp   testDelay;

;*********************************************************************
; Delay 0.083 msec with a 4MHz clock
;*********************************************************************
WAIT_83usec:
         ldi     Delay1,$69
         rjmp   testDelay;

;*********************************************************************
; Delay 0.107 msec with a 4MHz clock
;*********************************************************************
WAIT_107usec:
         ldi     Delay1,$88
         rjmp   testDelay;

;*********************************************************************
; Delay 0.143 msec with a 4MHz clock
;*********************************************************************
WAIT_143usec:
         ldi     Delay1,$B7
         rjmp   testDelay;

;*********************************************************************
; Delay 0.2 msec with a 4MHz clock
;*********************************************************************
WAIT_200usec:
         ldi    Delay2, $02
D02001:
         ldi     Delay1,$7F
         rcall   testDelay; // Rcall (not rjmp) so it returns to us
         dec    Delay2;
         brne   D02001;
         ret;

;*********************************************************************
; Delay 0.3 msec with a 4MHz clock
;*********************************************************************
WAIT_300usec:
         ldi    Delay2, $03
D03001:
         ldi     Delay1,$7F
         rcall   testDelay; // Rcall (not rjmp) so it returns to us
         dec    Delay2;
         brne   D03001;
         ret;

;*********************************************************************
; Delay 0.5 msec with a 4MHz clock
;*********************************************************************
;WAIT_500usec:
;        ldi    Delay2, $05
;D05001:
;        ldi     Delay1,$7F
;        rcall   testDelay; // Rcall (not rjmp) so it returns to us
;        dec    Delay2;
;        brne   D05001;
;        ret;

;*********************************************************************
; Delay 1.0 msec with a 4MHz clock
;*********************************************************************
WAIT_1000usec:
         ldi    Delay2, $0A
D10001:
         ldi     Delay1,$7F
         rcall   testDelay; // Rcall (not rjmp) so it returns to us
         dec    Delay2;
         brne   D10001;
         ret;

;*********************************************************************
; Delay 3.0 msec with a 4MHz clock
;*********************************************************************
WAIT_3000usec:
         ldi    Delay2, $1E
D30001:
         ldi     Delay1,$80
         rcall   testDelay; // Rcall (not rjmp) so it returns to us
         dec    Delay2;
         brne   D30001;
         ret;

;*********************************************************************
; Delay 12.0 msec with a 4MHz clock
;*********************************************************************
WAIT_12000usec:
         ldi    Delay2, $78
D120001:
         ldi     Delay1,$80
         rcall   testDelay; // Rcall (not rjmp) so it returns to us
         dec    Delay2;
         brne   D120001;
         ret;


------
On Monday, July 23, 2001, at 10:09 PM, Ray Bright wrote:

> Thanks for the response Don..... The problem occurs with both a Dick 
> Smith 2
> x 16 LCD (catalog Z4170) and a 2 x 40 Sharp LM402-55. I don't know 
> about the
> negative bias issue voltage issue, perhaps you could inform me further.
> In desperation to prove the LCDs are not "blown" I tried the Printer 
> port to
> LCD hardware & software set up off 
> wttp://ee.cleversoul.com/lcd_project.html
> and both worked fine.
> Really pulling out my hair on this one ....... Hope you or someone else 
> can
> help further
>
> ----- Original Message -----
> From: "Don McKenzie" <don@d...>
> To: <simmstick@yahoogroups.com>
> Sent: Sunday, July 22, 2001 3:11 PM
> Subject: Re: [simmstick] Can't run a LCD off a DT006
>
>
>>
>>
>>> Ray Bright wrote:
>>>
>>> I've assembled my Raver DT006 & it works as expected without any
>>> problems but I'm having a problem interfacing to a 2 x 16 LCD.
>>> Following the BASCOM AVR manual page 54 I've got it wired up ok and
>>> I've been able to run the LCD.BAS example on page 140 in simulate mode
>>> just fine but when I go to download it to the 2313 with a LCD
>>> connected it downloads OK but I can't get the LCD to work. Is there
>>> any common DT006 to LCD problem that I should be looking at.
>>> I've tried inserting a $crystal = 4000000 in the code and putting 10K
>>> pullups on the unused D4-D7, still won't work
>>
>> It is a standard LCD, not one of the ones that need a negative bias
>> voltage?
>> No, you don't need pullup resistors
>>
>> The bascom group may also be able to help also Ray.
>> no real tricks to it, as long as you connect up and configure the pins
>> correctly.
>>
>> Don McKenzie    mailto:don@d...      
>> http://www.dontronics.com
>>
>> The World's Largest Range of Atmel/AVR  & PICmicro Hardware and 
>> Software
>> Free Basic Compiler and Programmer 
>> http://www.dontronics.com/runavr.html
>> The Little "rAVeR!" AVR & Basic Kit 
>> http://www.dontronics.com/dt006.html
>>
>> To Post a message, send it to:   simmstick@e...
>>
>> To Unsubscribe, send a blank message to: simmstick-
>> unsubscribe@e...
>>
>> Your use of Yahoo! Groups is subject to 
>> http://docs.yahoo.com/info/terms/
>>
>
>
> To Post a message, send it to:   simmstick@e...
>
> To Unsubscribe, send a blank message to: simmstick-
> unsubscribe@e...
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>
805

From: Len Schaier  <lschaier@avotec.com>
Date: Wed Jul 25, 2001 9:23pm
Subject: mulit drop serial link

   
Has anybody seen any C code that implements a multidrop serial link, for 
example MODBUS. I have seen mentioned a WEBsite that lists software for the 
Atmel and microchip families but I don't recall the sites address.

Can anybody help?

Len
806

From: ARMIN UMHANG  <arem@tpg.com.au>
Date: Wed Jul 25, 2001 10:20pm
Subject: MPLAB/PRINTER PORT

   
I have downloaded and installed  MPLAB with a Pic C Compiler from CCS.
Both programs seem to work.

It would be appreciated if someone could tell me how to set up MPLAB to
use the LPT1 port to communicate with the DT001 board.

So far I have used Picall to load the Pics on the DT001 with no
problems.

Armin
807

From: tomcees_pic@yahoo.com
Date: Thu Jul 26, 2001 6:25am
Subject: PIC Basic with SimmStick

   
Greetings:

I am using the mel PICBASIC compiler with a 16F84. 
The Serialin and Serialout instructions use pins on
port b of the part, whereas the simmstick is hardwired
for the serial I/O on port a pins.

Can anyone recommend how/if I can change the header
files (or whatever) to have the serialio commands use
port a?

Thanks.
808

From: ARMIN UMHANG  <arem@tpg.com.au>
Date: Thu Jul 26, 2001 6:56am
Subject: Re: PIC Basic with SimmStick

   
Here is part of a program.  It may help you.

'RA2    SERIN COMPUTER
'RA3    SEROUT COMPUTER
'B0     SERIN 2060
'B1     SEROUT 2060
'B6     READ
'B7     WRITE


             INCLUDE "MODEDEFS.BAS"

                B0 VAR WORD
                B2 VAR BYTE
              test VAR BYTE [20]

                DEFINE CHAR_PACING 1000

LOOP:


        SERIN2 PORTA.2, 84,[str test\20\13]



        SEROUT2 PORTa.3, 84,[str test,10]

        GOTO LOOP
END


tomcees_pic@y... wrote:

> Greetings:
>
> I am using the mel PICBASIC compiler with a 16F84.
> The Serialin and Serialout instructions use pins on
> port b of the part, whereas the simmstick is hardwired
> for the serial I/O on port a pins.
>
> Can anyone recommend how/if I can change the header
> files (or whatever) to have the serialio commands use
> port a?
>
> Thanks.
>
>
> To Post a message, send it to:   simmstick@e...
>
> To Unsubscribe, send a blank message to: simmstick-unsubscribe@e...
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
809

From: Don McKenzie  <don@dontronics.com>
Date: Thu Jul 26, 2001 7:02am
Subject: Re: MPLAB/PRINTER PORT

   
ARMIN UMHANG wrote:
> 
> I have downloaded and installed  MPLAB with a Pic C Compiler from CCS.
> Both programs seem to work.
> 
> It would be appreciated if someone could tell me how to set up MPLAB to
> use the LPT1 port to communicate with the DT001 board.
> 
> So far I have used Picall to load the Pics on the DT001 with no
> problems.
> 
> Armin

Hi Armin, mplab isn't compatible with parallel ports, only serial
interfaces.
When I say compatible, I mean working directly with it as an integrated
unit.

Of course, you can get the hex output of mplab and task switch to burn
with p16pro to the dt001, which I dare say you have been doing with
whatever you have used in the past, it simply isn't driven from mplab.

There are only two mplab compatible programmers to my knowledge. they
are the microchip picstart+ and the warp-13.

http://www.dontronics.com/newfound.html for the w-13

Don McKenzie    mailto:don@d...      http://www.dontronics.com

The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
810

From: ARMIN UMHANG  <arem@tpg.com.au>
Date: Fri Jul 27, 2001 6:59am
Subject: Re: MPLAB/PRINTER PORT

   
Thanks Don

Don McKenzie wrote:

> ARMIN UMHANG wrote:
> >
> > I have downloaded and installed  MPLAB with a Pic C Compiler from CCS.
> > Both programs seem to work.
> >
> > It would be appreciated if someone could tell me how to set up MPLAB to
> > use the LPT1 port to communicate with the DT001 board.
> >
> > So far I have used Picall to load the Pics on the DT001 with no
> > problems.
> >
> > Armin
>
> Hi Armin, mplab isn't compatible with parallel ports, only serial
> interfaces.
> When I say compatible, I mean working directly with it as an integrated
> unit.
>
> Of course, you can get the hex output of mplab and task switch to burn
> with p16pro to the dt001, which I dare say you have been doing with
> whatever you have used in the past, it simply isn't driven from mplab.
>
> There are only two mplab compatible programmers to my knowledge. they
> are the microchip picstart+ and the warp-13.
>
> http://www.dontronics.com/newfound.html for the w-13
>
> Don McKenzie    mailto:don@d...      http://www.dontronics.com
>
> The World's Largest Range of Atmel/AVR  & PICmicro Hardware and Software
> Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html
> The Little "rAVeR!" AVR & Basic Kit http://www.dontronics.com/dt006.html
>
>
> To Post a message, send it to:   simmstick@e...
>
> To Unsubscribe, send a blank message to: simmstick-unsubscribe@e...
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Check all - Clear all
  781-810 of 1612  |  Previous | Next  [ First | Last ]
 
 Msg #   Date  |  Thread
Collapse Messages


Copyright © 2003 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Copyright Policy - Guidelines - Help - Ad Feedback