Dear Erich, I have done what you wrote, seems to work.But when I look to te 
code of twi.frt I see some strange thing, or missing sommething. When I look 
into the code never is sending the address in twi.start \ send start condition
: twi.start ( -- )
    [ 1 7 lshift
      1 5 lshift or 
      1 2 lshift or ] literal
    TWCR c!
    twi.wait
; Where should I put the address? Thanks for any help.Cheers, Jan
 > Date: Fri, 1 Jun 2012 21:36:24 +0200
> From: ew.fo...@nassur.net
> To: amforth-devel@lists.sourceforge.net
> Subject: Re: [Amforth] TWI - 7segment display Gravitech.us
> 
> Hi Jan,
> 
> 
> On 06/01/2012 08:58 PM, Jan Kromhout wrote:
> > It is not working.
> 
> Where exactly is "it"?
> 
> Can you talk to the twi device? Did you try twi.scan? It should 
> report every device on the twi bus.
> 
> Did you enable the twi subsystem?
> 
> \ enable twi
> \ TWBR = $03, TWPS[10] = $03  ==> 28 kHz (f_cpu: 11059200)
> : +twi ( -- )
>      $00 TWCR c!
>      $03 TWBR c!
>      $03 TWSR c!
> ;
> This code snippet works on atmega32. Check the datasheet whether 
> it is the same for your controller.
> 
> > It seems to hang. Can continue with a hard reset!
> 
> 
> Cheers,
> Erich
> 
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel
                                          
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to