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
 
  811-840 of 1612  |  Previous | Next  [ First | Last ]
 
 Msg #   Date  |  Thread
811

From: Don McKenzie  <don@dontronics.com>
Date: Fri Jul 27, 2001 8:50am
Subject: The STV5730A OSD chip is about to become obsolete

   
27-Jul-2001 The STV5730A OSD chip is about to become obsolete:
Information kindly supplied by Simon Blake of The BlackBoxCamera Company
Ltd.
We became aware of the situation recently.  We have been advised that
November is last orders meaning that 
delivery can be scheduled into next year for account customers.  We have
not decided on a replacement, but there will definitely be no
replacement from ST.  See the notice at http://www.wbc-europe.com/pcn
As such, when current stocks of the Dontronics DT108 board are sold,
there will be no immediate replacement.

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


   
ADVERTISEMENT


812

From: Ray Bright  <rbright@icenet.com.au>
Date: Fri Jul 27, 2001 10:57am
Subject: Re: Can't run a LCD off a DT006

   
Thanks Ben for the clues it's comforting to find someone that has had
success with a Dick Smith module. I'll try the 10,000 uF across the supply
later today when I purchase one although the Raver is fitter with a 1,000uF.
I've actually tries a .01uF across the supply as a decoupling capacitor to
filter out any high frequency components with no success. Using a CRO the
power supply looks very clean at the LCD.
Have tried inserting the delays between lines of my original basic code
without success.
Your attachment actually came through as 2 files with the same name one
being 78 bytes & the other 2.18kb. The larger file downloaded to the Raver
ok and got the Raver LEDs flahing nicely but still the LCD only shows fully
shaded block characters ie every segment on as if the LCD RAM is not being
written to.
I see your LCD configuration is with all 8 data lines connected to the LCD,
have you got a Dick Smith module to work with only 4 bits?
So my problems still persist with this DSmith module as well as a 2x40
module although both LCD modules work fine direct from a parallel port
interface. May have to get desperate and see if I can get things working on
a DT104 pcb that I have or worst still drag out the CRO and start looking at
the timing of waveforms. Once again thanks for the response, appreciate any
further ideas that you may have.

----- Original Message -----
From: "Ben Hitchcock" <ben@w...>
To: <simmstick@yahoogroups.com>
Sent: Wednesday, July 25, 2001 6:39 AM
Subject: Re: [simmstick] 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 missing>
>
> 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/
> >
> >
>


----------------------------------------------------------------------------
----


> 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.
>
>


----------------------------------------------------------------------------
----


>
>
> 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/
> >
> >
>
813

From: R Severson  <severson@starband.net>
Date: Fri Jul 27, 2001 11:24am
Subject: RE: The STV5730A OSD chip is about to become obsolete

   
Bad news for the BOB II module too, right?

I have 1 more DT108 than 5730...

The Philips PCS8514 is/will be gone too.

-Rob

> -----Original Message-----
> From: Don McKenzie [mailto:don@d...]
> Sent: Thursday, July 26, 2001 5:51 PM
> To: SimmStick Group
> Subject: [simmstick] The STV5730A OSD chip is 
> about to become obsolete
> 
> 
> 
> 
> 27-Jul-2001 The STV5730A OSD chip is about to 
> become obsolete:
> Information kindly supplied by Simon Blake of The 
> BlackBoxCamera Company
> Ltd.
> We became aware of the situation recently.  We 
> have been advised that
> November is last orders meaning that 
> delivery can be scheduled into next year for 
> account customers.  We have
> not decided on a replacement, but there will 
> definitely be no
> replacement from ST.  See the notice at 
> http://www.wbc-europe.com/pcn
> As such, when current stocks of the Dontronics 
> DT108 board are sold,
> there will be no immediate replacement.
> 
> 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
> 
> ------------------------ Yahoo! Groups Sponsor 
> 
> 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/ 
> 
>
814

From: Don McKenzie  <don@dontronics.com>
Date: Fri Jul 27, 2001 0:24pm
Subject: PIXIE Visual Development and Full PIC C Compiler.

   
27-Jul-2001 
PIXIE Visual Development and Full PIC C Compiler. 
The FED C Compiler and PIXIE will handle any of the current 14 bit PIC's
and PIC18CXXX 16 bit core PIC's future devices may be added by changing
a single data file and downloading the new C header file. 
http://www.dontronics.com/fed.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
815

From: Ben Hitchcock  <benhi98@wollongong.apana.org.au>
Date: Sat Jul 28, 2001 11:18am
Subject: Re: Can't run a LCD off a DT006

   
Hi,



> Have tried inserting the delays between lines of my original basic code
> without success.
> Your attachment actually came through as 2 files with the same name one
> being 78 bytes & the other 2.18kb. The larger file downloaded to the
> Raver
> ok and got the Raver LEDs flahing nicely but still the LCD only shows
> fully
> shaded block characters ie every segment on as if the LCD RAM is not
> being written to.

I'm using MacOS X now, nad still haven't worked out some of the kinks...
I take it you wired up the LCD module as per the connection
diagram?  Specifically, portD 5 (pin 9) and portD 6 (pin 11)?
Are you using an AT90S2313?

> I see your LCD configuration is with all 8 data lines connected to the
> LCD, have you got a Dick Smith module to work with only 4 bits?

Nope.  I couldn't see how to do it using the data supplied with the Dick
Smith module, so I did it with a shift register (2 lines instead of 4).

> So my problems still persist with this DSmith module as well as a 2x40
> module although both LCD modules work fine direct from a parallel port
> interface. May have to get desperate and see if I can get things working
> on
> a DT104 pcb that I have or worst still drag out the CRO and start
> looking at
> the timing of waveforms. Once again thanks for the response, appreciate
> any further ideas that you may have.

Have you had a dig through www.avrfreaks.net?

Good luck,

Ben
816

From: Mike DeMetz  <miked@elkhart.net>
Date: Sat Jul 28, 2001 11:43am
Subject: RE: The STV5730A OSD chip is about to become obsolete

   
And Intuitive Circuits line of OSD devices.

> Bad news for the BOB II module too, right?
> 
> I have 1 more DT108 than 5730...
> 
> The Philips PCS8514 is/will be gone too.
> 
> -Rob
>
817

From: Don McKenzie  <don@dontronics.com>
Date: Sat Jul 28, 2001 1:01pm
Subject: Re: The STV5730A OSD chip is about to become obsolete

   
Mike DeMetz wrote:
> 
> And Intuitive Circuits line of OSD devices.
> 
> > Bad news for the BOB II module too, right?
> >
> > I have 1 more DT108 than 5730...
> >
> > The Philips PCS8514 is/will be gone too.
> >
> > -Rob

I spoke to Mike Hardwick at Decade Engineering (Bob-II), and he was well
aware of it, and says he will design his own cct, so he doesn't have to
depend on companies that decide that it is no longer viable to produce a
specific chip. 

Trouble is companies like ST no doubt sell in 100K+ quantities, and if
order levels drop, they drop production.

prior to Lionel Theunissen coming up with the dt108 board, Nigel Goodwin
was having a look at much the same project for me, but using an
alternative OSD chip. This fell into a hole because of sourcing problems
with that chip. Forget what it was now, as it goes back 3 or 4 years.

Perhaps Mike Hardwick is right, but I dare say it will be a bit of a
monster schematic.

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
818

From: Nigel Goodwin  <nigelg@lpilsley.co.uk>
Date: Sun Jul 29, 2001 3:39am
Subject: Re: The STV5730A OSD chip is about to become obsolete

   
In message <3B622AF5.882FBC95@d...>, Don McKenzie
<don@d...> writes
>prior to Lionel Theunissen coming up with the dt108 board, Nigel Goodwin
>was having a look at much the same project for me, but using an
>alternative OSD chip. This fell into a hole because of sourcing problems
>with that chip. Forget what it was now, as it goes back 3 or 4 years.

Hi Don,

It was an NEC chip I was using, I've managed to get hold of a few out of
old Hitachi VCR's - enough for my requirements. I never did manage to
get a sample of the later NEC chip, so I gave up :-(.
-- 

Nigel.

        /--------------------------------------------------------------\
        | Nigel Goodwin   | Internet : nigelg@l...           |
        | Lower Pilsley   | Web Page : http://www.lpilsley.co.uk       |
        | Chesterfield    | Official site for Shin Ki and New Spirit   |
        | England         |                 Ju Jitsu                   |
        \--------------------------------------------------------------/
819

From: Mike DeMetz  <miked@elkhart.net>
Date: Sun Jul 29, 2001 10:46am
Subject: Re: The STV5730A OSD chip is about to become obsolete

   
I the BOB-I used a Rhom chip, which is obsolete I assume? 
> I spoke to Mike Hardwick at Decade Engineering (Bob-II), and he was well
> aware of it, and says he will design his own cct, so he doesn't have to
> depend on companies that decide that it is no longer viable to produce a
> specific chip. 
> 
> Trouble is companies like ST no doubt sell in 100K+ quantities, and if
> order levels drop, they drop production.
I had some code from someone  for a NEC chip(made for VCRs), later 
changed for a different NEC chip since the first went out of production
> prior to Lionel Theunissen coming up with the dt108 board, Nigel Goodwin
> was having a look at much the same project for me, but using an
> alternative OSD chip. This fell into a hole because of sourcing problems
> with that chip. Forget what it was now, as it goes back 3 or 4 years.
Anyone know what the ITU Technologies OSD used? It was one of the 
smallest and cheapest.
> Perhaps Mike Hardwick is right, but I dare say it will be a bit of a
> monster schematic.
> 
> Don McKenzie    mailto:don@d...      http://www.dontronics.com
820

From: Ray Bright  <rbright@icenet.com.au>
Date: Sun Jul 29, 2001 11:36pm
Subject: Success to - Can't run a LCD off a DT006

   
After building up the hardware to work off a DT104 I found that no D5 & D6
data was getting out onto the SIMM connector of the DT006 because J14 links
were missing. Opps......
Ben thanks for the excellent sample code - in your advice for the Dick Smith
module I think you have "Connect LCD pin 6 to PORTD 6 and Connect LCD pin 4
to PORTD 5" maybe reversed.
Thanks to everone who contibuted to my call for assistance


----- Original Message -----
From: "Ben Hitchcock" <ben@w...>
To: <simmstick@yahoogroups.com>
Sent: Wednesday, July 25, 2001 6:39 AM
Subject: Re: [simmstick] 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 missing>
>
> 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/
> >
> >
>


----------------------------------------------------------------------------
----


> 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.
>
>


----------------------------------------------------------------------------
----


>
>
> 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/
> >
> >
>
821

From: Don McKenzie  <don@dontronics.com>
Date: Mon Jul 30, 2001 9:04am
Subject: Re: Success to - Can't run a LCD off a DT006

   
Ray Bright wrote:
> 
> After building up the hardware to work off a DT104 I found that no D5 & D6
> data was getting out onto the SIMM connector of the DT006 because J14 links
> were missing. Opps......

wish I had of thought of telling you that Ray, but it is in big bold red
and blue text in the instructions.
We all know. RTFM. :-)

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
822

From: Don McKenzie  <don@dontronics.com>
Date: Tue Jul 31, 2001 5:15pm
Subject: Wiresncode 8051 Development board.

   
31-Jul-2001 
Wiresncode 8051 Development board. This is a SimmStick compatible board
for 8051 program development.
Hardware features: 40pin DIP for 8051/8751/8052/8752 CPU, SimmStick edge
connector for power, serial and parallel I/O 128k EEPROM, 64k SRAM, Soft
decoding memory through GAL, 4 memory decode select jumpers parallel I/O
to match Dontronics DT104 with Atmel 89C2051 CPU, uses ex-motherboard
chips (cache RAM and BIOS EEPROM)
http://www.wiresncode.com/projects/dev8051/

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
823

From: Don McKenzie  <don@dontronics.com>
Date: Tue Jul 31, 2001 6:33pm
Subject: "Listen Anywhere - A Wireless Remote Jukebox"

   
31-Jul-2001 
Hi, A note to let you know that your company is featured in the article
"Listen Anywhere - A Wireless Remote Jukebox".  I will be sending you a
complimentary copy of that issue at the end of August when it comes
out.  I believe you already have out free media kit but if you should
not have it, just let me know and I will send that at the same time. 
The Sept. issue is our largest of the year and will get larger than
average coverage. Great exposure for Dontronics. Have a great day. Sally
Collins Circuit Cellar sally@c... www.circuitcellar.com

Hmm.... Wonder who wrote this project??

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
824

From: Don McKenzie  <don@dontronics.com>
Date: Fri Aug 3, 2001 10:43am
Subject: Dontronics Vacation

   
My daughter Sharon will be running Dontronics for a few weeks while
I am on vacation.

This is the message I am cutting and pasting to customers.
Sharon will do all software keys/files, drop shipping orders, 
and ship most hardware products while I am away. 
She knows business computer systems, and has a good knowledge 
of the Internet, however she doesn't know all aspects of Dontronics.

If you need any physical goods from Dontronicts, I suggest you order
now.

Cheers Don...
===========================================================
Hi ,

Currently, Don is away for a few weeks vacation, and I am unable to
answer technical questions.
He will be away from 24th of August to the 12th of September 2001.

please read:
http://www.dontronics.com/faq.html
this contains most of the frequently asked questions,
and answers questions you may have asked.

Also http://www.dontronics.com/chat.html will tell you how to join many
newsgroups for answers.

If you are still in need of answers, I suggest you send Don an email
after he has returned.

Sharon Burke - Office Manager Dontronics.
=========================================

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
825

From: Don McKenzie  <don@dontronics.com>
Date: Thu Aug 9, 2001 10:15am
Subject: Re: Fw: order.....

   
Sage Telecommunications wrote:
> 
> Hi Don,
> I have received the message below.
> When I tried to go to the usbsimm site http://usbsimm.home.att.net/ I get a
> content not available page.
> Do you have any of the USBSIMM and/or contact details for them?
> Thanks
> Rod
> 
> ----- Original Message -----
> From: mingching <mad99@k...>
> To: <info@s...>
> Sent: Wednesday, August 08, 2001 10:17 PM
> Subject: order.....
> 
> Where can I order the USBSIMM in Taiwan ???
> 
> Mingching Hung

I took the liberty of dropping this one on the SimmStick group Rod, as I
can't assist.
I get some weird happenings when I try to log onto that site.
Robert Severson may be able to help, however he no longer works for the
company.

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
826

From: R Severson  <severson@starband.net>
Date: Thu Aug 9, 2001 10:48am
Subject: RE: Re: Fw: order.....

   
Hi!


> Sage Telecommunications wrote:

> > When I tried to go to the usbsimm site
> http://usbsimm.home.att.net/ I get a
> > content not available page.
> > Do you have any of the USBSIMM and/or contact
> details for them?


> I took the liberty of dropping this one on the
> SimmStick group Rod, as I can't assist.
> I get some weird happenings when I try to log
> onto that site.
> Robert Severson may be able to help, however he
> no longer works for the company.


The site is no longer there. I can help by providing a copy
of the information that I have. I no longer work for the
company where I designed the USBSIMM, but I'm always willing
to help out where I can with the SimmStick group.

Hey, Don. I thought that you were on vacation? This message
came to the group:

"Currently, Don is away for a few weeks vacation, and I am
unable to
answer technical questions.
He will be away from 24th of August to the 12th of September
2001."

But saying "currently" when it is not within those dates
doesn't make sense.

:-)

-Rob
827

From: Don McKenzie  <don@dontronics.com>
Date: Thu Aug 9, 2001 11:25am
Subject: Re: Re: Fw: order.....

   
Hi Rob, no, that is the message that will be cut and pasted when I am
away. (see below)

and thanks, I knew you would assist if you could.

I'll cc this back the the original poster.

Cheers Don...
===========================================================
My daughter Sharon will be running Dontronics for a few weeks while
I am on vacation.

This is the message I am cutting and pasting to customers.
Sharon will do all software keys/files, drop shipping orders, 
and ship most hardware products while I am away. 
She knows business computer systems, and has a good knowledge 
of the Internet, however she doesn't know all aspects of Dontronics.

If you need any physical goods from Dontronics, I suggest you order
now.

Cheers Don...


R Severson wrote:
> 
> Hi!
> 
> > Sage Telecommunications wrote:
> 
> > > When I tried to go to the usbsimm site
> > http://usbsimm.home.att.net/ I get a
> > > content not available page.
> > > Do you have any of the USBSIMM and/or contact
> > details for them?
> 
> > I took the liberty of dropping this one on the
> > SimmStick group Rod, as I can't assist.
> > I get some weird happenings when I try to log
> > onto that site.
> > Robert Severson may be able to help, however he
> > no longer works for the company.
> 
> The site is no longer there. I can help by providing a copy
> of the information that I have. I no longer work for the
> company where I designed the USBSIMM, but I'm always willing
> to help out where I can with the SimmStick group.
> 
> Hey, Don. I thought that you were on vacation? This message
> came to the group:
> 
> "Currently, Don is away for a few weeks vacation, and I am
> unable to
> answer technical questions.
> He will be away from 24th of August to the 12th of September
> 2001."
> 
> But saying "currently" when it is not within those dates
> doesn't make sense.
> 
> :-)
> 
> -Rob
> 
> 
> 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/

-- 
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
828

From: R Severson  <severson@starband.net>
Date: Thu Aug 9, 2001 11:34am
Subject: RE: Re: Fw: order.....

   
Don,

NOW it makes sense...

Thanks!

-Rob

> -----Original Message-----
> From: Don McKenzie [mailto:don@d...]
> Sent: Wednesday, August 08, 2001 8:26 PM
> To: simmstick@yahoogroups.com; mad99@k...
> Subject: Re: [simmstick] Re: Fw: order.....
>
>
>
> Hi Rob, no, that is the message that will be cut
> and pasted when I am
> away. (see below)
>
> and thanks, I knew you would assist if you could.
>
> I'll cc this back the the original poster.
>
> Cheers Don...
> ==================================================
> =========
> My daughter Sharon will be running Dontronics for
> a few weeks while
> I am on vacation.
>
> This is the message I am cutting and pasting to customers.
> Sharon will do all software keys/files, drop
> shipping orders,
> and ship most hardware products while I am away.
> She knows business computer systems, and has a
> good knowledge
> of the Internet, however she doesn't know all
> aspects of Dontronics.
>
> If you need any physical goods from Dontronics, I
> suggest you order
> now.
>
> Cheers Don...
>
>
> R Severson wrote:
> >
> > Hi!
> >
> > > Sage Telecommunications wrote:
> >
> > > > When I tried to go to the usbsimm site
> > > http://usbsimm.home.att.net/ I get a
> > > > content not available page.
> > > > Do you have any of the USBSIMM and/or contact
> > > details for them?
> >
> > > I took the liberty of dropping this one on the
> > > SimmStick group Rod, as I can't assist.
> > > I get some weird happenings when I try to log
> > > onto that site.
> > > Robert Severson may be able to help, however he
> > > no longer works for the company.
> >
> > The site is no longer there. I can help by
> providing a copy
> > of the information that I have. I no longer work for the
> > company where I designed the USBSIMM, but I'm
> always willing
> > to help out where I can with the SimmStick group.
> >
> > Hey, Don. I thought that you were on vacation?
> This message
> > came to the group:
> >
> > "Currently, Don is away for a few weeks
> vacation, and I am
> > unable to
> > answer technical questions.
> > He will be away from 24th of August to the 12th
> of September
> > 2001."
> >
> > But saying "currently" when it is not within those dates
> > doesn't make sense.
> >
> > :-)
> >
> > -Rob
> >
> >
> > 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/
>
> --
> 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
>
> ------------------------ Yahoo! Groups Sponsor
>
> 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/
>
>
829

From: McIlvaine, Robert  <rmcilvaine@zydacron.com>
Date: Sat Aug 11, 2001 0:24am
Subject: FED C Compiler w/ WIZASM

   
Hi All,

In anticipation of geting back into my PIC projects I was lookin at the FED
C compiler. I sent the email below to FED, no response yet.

Does anyone here have any experience?

TIA
Regards,
Mac

Robert "Mac" McIlvaine
email: rmcilvaine@z... <mailto:rmcilvaine@z...>
phone: 603 647-1000 x1185
fax: 603 647-9470
Zydacron, Inc.
7 Perimeter Rd.
Manchester, NH 03103
www.zydacron.com <http://www.zydacron.com>
 


> -----Original Message-----
> From: McIlvaine, Robert 
> Sent: Wednesday, August 08, 2001 10:18 AM
> To: 'info@f...'
> Subject: FED C Compiler
> 
> 
> Hi,
> 
> I think I want "The Forest Electronic Developments C Compiler 
> Version 7.0" with WIZASM.
> 
> But, I'm a bit confused as to how the two fit/work together.
> 
> It appears WIZASM is wizard front end that generates a lot of 
> the setup associated with I/O, etc. Once I've defined the 
> chip, the speed, the serial I/O, etc. what does it create? 
> Where does the C compiler fit in the mix?
> 
> TIA
> 
> Best Regards,
> Mac
830

From: Don McKenzie  <don@dontronics.com>
Date: Sat Aug 11, 2001 6:54am
Subject: Re: FED C Compiler w/ WIZASM

   
"McIlvaine, Robert" wrote:
> 
> Hi All,
> 
> In anticipation of geting back into my PIC projects I was lookin at the FED
> C compiler. I sent the email below to FED, no response yet.
> 
> Does anyone here have any experience?
> 
> TIA
> Regards,
> Mac

Hi Mac,

Robin is away on vacation until the 14th of this month, so you won't get
an answer back, however have a look at:
http://www.dontronics.com/fed.html
I say there that the product isn't selling just yet, well it is really,
it's just that the CD won't be shipped until Robin gets back. I can
generate keys to unlock the demo version now.

I'm not familiar with WIZASM, however PIXIE is an IDE front end for the
FED C Compiler, and what I have advertised is PIXIE and FED C all in one
package.

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
831

From: Don McKenzie  <don@dontronics.com>
Date: Sat Aug 11, 2001 6:56am
Subject: Australian Electronics: Seeking New Webring Master.

   
Australian Electronics: Seeking New Webring Master.

The Australian Electronics Webring charter can be found at:
http://www.dontronics.com/aering.html

I am seeking an individual or Company, that is prepared to carry out the
duties of Web Master
for the Australian Electronics Web Ring. This is a free service with no
money involved.

You must be internet accessible on an almost daily basis for the service
of all members, and to
promote the growth of the ring, and of course Electronics in Australia.

Basically it is ongoing job with very little personal thanks, however it
should serve to
promote the growth of your business or product. 

I will consider any person or company that complies with the terms of
the ring charter, but
would prefer to select from someone known to me.

You must be a member of the ring, however anyone that can comply with
the rules to join the
ring, can be the Web Master.

This message is also circulated to the existing Australian Electronics
Webring members.

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
832

From: Don McKenzie  <don@dontronics.com>
Date: Mon Aug 13, 2001 7:18am
Subject: Australian Electronics: New Webring Master Announced. (and the PICmicro Ring)

   
Darren Jensen (http://www.tracktronics.com.au) an existing ring member,
has been kind enough to take over the role of Ring Master of the
Australian Electronics Web Ring.

Thanks to those members that offered to assist in this role if I was
unable to get someone readily, and would like to take this opportunity
to wish Darren the best of luck, and to thank existing members for their
support during my time as Ring Master.

I know without an active Ring Master, the ring becomes stagnant, and
fairly quickly loses the support of the theme community. The PICmicro
Ring is a sad example of this, as it has had 104 members for the last 6
to 12 months, and I think I have been fielding majority of the admin.
questions for it. It is about time someone started a new ring for the
PICmicro, and the old one was pushed into Cyberspace.

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
833

From: McIlvaine, Robert  <rmcilvaine@zydacron.com>
Date: Wed Aug 22, 2001 9:47pm
Subject: Just checking...

   
Hi all,

I've been reading the docs and just want to make sure that I've seen what I
think I've seen.

If I have a DT106 plugged into slot 1 on a DT001 and the DT001 toggle switch
is set to load I should be able to program a '877 PIC.

The DT106 has no peripheral devices (i.e. DS1203, etc.) and a ZIF socket,
but what is the minimum  parts complement for the board for this
application?

TIA,
Mac

Robert "Mac" McIlvaine
email: rmcilvaine@z... <mailto:rmcilvaine@z...>
phone: 603 647-1000 x1185
fax: 603 647-9470
Zydacron, Inc.
7 Perimeter Rd.
Manchester, NH 03103
www.zydacron.com <http://www.zydacron.com>
834

From: Don McKenzie  <don@dontronics.com>
Date: Thu Aug 23, 2001 9:54am
Subject: Re: Just checking...

   
"McIlvaine, Robert" wrote:
> 
> Hi all,
> 
> I've been reading the docs and just want to make sure that I've seen what I
> think I've seen.
> 
> If I have a DT106 plugged into slot 1 on a DT001 and the DT001 toggle switch
> is set to load I should be able to program a '877 PIC.
> 
> The DT106 has no peripheral devices (i.e. DS1203, etc.) and a ZIF socket,
> but what is the minimum  parts complement for the board for this
> application?
> 
> TIA,
> Mac

Just the 5 wire programming cct is all you need Mac.
Yes, it should program fine.

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

PICMicro C Compiler & PICC-18 C Compiler by Hi-Tech @ $100USD Off Retail
The World's Largest Range of Atmel/AVR &  PICmicro Hardware and Software
835

From: antti@case2000.com
Date: Sat Aug 25, 2001 3:52am
Subject: From Antti, for those who remember

   
Hello,

I feel so[metimes] so sad that I have broken so many promises
and left down so many people. Well I have to admit, I dont even
hope to make myself better than I am. So even if I cant fullfill
promises once given, there are still things I can do, please
read from:

http://www.case2000.com/R.O.L

From there a lot of projects and sources from my past live are
accessible, I think I will add more and maybe even 'sort them'
one day, but I am not giving any promise on that. So for today
its mainly of big 'junk' of projects and source code. MY LIFE.

I hesitated long before posting to SimmStick, and was actually
not going to, but then I went to "dig", into the same source
code pool that is online, to find something that might be of
interest to SimmStick, and well I found something that I did
think was lost (computer in fire)

http://mydesk.graphord.com/files/Case2000/Public/microcontrollers/avr/
abc/src/USB/9602/

This is direct link to AVR+USB project that was once oneline.
Yes the 'test platform' was of course SimmStick.

For those who remember
http://www.case2000.com/Antti
836

From: ARMIN UMHANG  <arem@tpg.com.au>
Date: Mon Aug 27, 2001 7:49pm
Subject: Electro static problems

   
Help Help!!

I have build a nice pic controller  (16f876) with a 3x4 key pad and a
16x2 LCD.
The controller is used for a vacuum transfer system.
When the vacuum  motor starts powder is sucked through flexible 11/2"
hose into a receiver. The hose has anti static straps and is grounded as
well as the stainless steel receiver and motor enclosure. On the product
receiver is a 12VDC solenoid that is activated for filter cleaning.
(30ms air pulses)
The pic controller is mounted on a dt106 board and all the recommended
capacitors are mounted correctly. A mains filter is installed in the
240V line to the power supply.
Despite of all the grounding on the system, a static build up is still
readable on the multimeter. It is naturally very erratic and very short
so no accurate reading can be taken.

Problem: the controller resets at random.  I suspect that the
interference, charge or discharge is picked up by the solenoid.  ( diode
is installed across the coil)

Q:  Has anybody experience with control of static charge? Is there a way
to safeguard the micro controller from resetting?

I really would appreciate any suggestions or web link for further info
on this subject.

Regards

Armin Umhang
837

From: Alan Boldock  <alan@boldenterprise.com.au>
Date: Mon Aug 27, 2001 10:05pm
Subject: Re: Electro static problems

   
Could you use optical isolators to electrically issolate
the solenoid and connect the cct earth to a real earth. We have
had similar probelms in the past using EEG equipment. We had
a faraday cage around an entire room to isolate RFI
inteferance. It didn't work!

Alan Boldock


----- Original Message -----
From: "ARMIN UMHANG" <arem@t...>
To: <simmstick@yahoogroups.com>
Sent: Monday, August 27, 2001 7:19 PM
Subject: [simmstick] Electro static problems


> Help Help!!
>
> I have build a nice pic controller  (16f876) with a 3x4 key pad and a
> 16x2 LCD.
> The controller is used for a vacuum transfer system.
> When the vacuum  motor starts powder is sucked through flexible 11/2"
> hose into a receiver. The hose has anti static straps and is grounded as
> well as the stainless steel receiver and motor enclosure. On the product
> receiver is a 12VDC solenoid that is activated for filter cleaning.
> (30ms air pulses)
> The pic controller is mounted on a dt106 board and all the recommended
> capacitors are mounted correctly. A mains filter is installed in the
> 240V line to the power supply.
> Despite of all the grounding on the system, a static build up is still
> readable on the multimeter. It is naturally very erratic and very short
> so no accurate reading can be taken.
>
> Problem: the controller resets at random.  I suspect that the
> interference, charge or discharge is picked up by the solenoid.  ( diode
> is installed across the coil)
>
> Q:  Has anybody experience with control of static charge? Is there a way
> to safeguard the micro controller from resetting?
>
> I really would appreciate any suggestions or web link for further info
> on this subject.
>
> Regards
>
> Armin Umhang
>
>
>
>
> 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/
>
>
>
838

From: Rhino  <rhino@uq.net.au>
Date: Tue Aug 28, 2001 5:27pm
Subject: Design contest?

   
Will there be a Simmstick design contest this year?
I expected too see it advertised by now.

Regards
Rhino
839

From: ARMIN UMHANG  <arem@tpg.com.au>
Date: Tue Aug 28, 2001 9:04pm
Subject: Re: Electro static problems

   
Thanks for your replay Alan

I think my problem can be solved.   Made same progress today but I am not there yet. I'll keep you posted either way.
Armin

Alan Boldock wrote:

> Could you use optical isolators to electrically issolate
> the solenoid and connect the cct earth to a real earth. We have
> had similar probelms in the past using EEG equipment. We had
> a faraday cage around an entire room to isolate RFI
> inteferance. It didn't work!
>
> Alan Boldock
>
> ----- Original Message -----
> From: "ARMIN UMHANG" <arem@t...>
> To: <simmstick@yahoogroups.com>
> Sent: Monday, August 27, 2001 7:19 PM
> Subject: [simmstick] Electro static problems
>
> > Help Help!!
> >
> > I have build a nice pic controller  (16f876) with a 3x4 key pad and a
> > 16x2 LCD.
> > The controller is used for a vacuum transfer system.
> > When the vacuum  motor starts powder is sucked through flexible 11/2"
> > hose into a receiver. The hose has anti static straps and is grounded as
> > well as the stainless steel receiver and motor enclosure. On the product
> > receiver is a 12VDC solenoid that is activated for filter cleaning.
> > (30ms air pulses)
> > The pic controller is mounted on a dt106 board and all the recommended
> > capacitors are mounted correctly. A mains filter is installed in the
> > 240V line to the power supply.
> > Despite of all the grounding on the system, a static build up is still
> > readable on the multimeter. It is naturally very erratic and very short
> > so no accurate reading can be taken.
> >
> > Problem: the controller resets at random.  I suspect that the
> > interference, charge or discharge is picked up by the solenoid.  ( diode
> > is installed across the coil)
> >
> > Q:  Has anybody experience with control of static charge? Is there a way
> > to safeguard the micro controller from resetting?
> >
> > I really would appreciate any suggestions or web link for further info
> > on this subject.
> >
> > Regards
> >
> > Armin Umhang
> >
> >
> >
> >
> > 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/
840

From: R Severson  <severson@starband.net>
Date: Tue Aug 28, 2001 10:30pm
Subject: RE: Design contest?

   
It is my understanding that this year there will not be a
contest. I could be wrong, but that is something I heard
earlier this year.

Don would know, but he is on vacation/holiday. Rod would be
the next likely to comment.

I have never entered, but I did provide one prize. I think
that the contest is great. I hope that there can be more.

-Rob


> -----Original Message-----
> From: Rhino [mailto:rhino@u...]
> Sent: Tuesday, August 28, 2001 2:27 AM
> To: simmstick@yahoogroups.com
> Subject: [simmstick] Design contest?
>
>
>
> Will there be a Simmstick design contest this year?
> I expected too see it advertised by now.
>
> Regards
> Rhino
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> 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
  811-840 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