From: Jan K. <kro...@ho...> - 2012-06-02 17:34:00
|
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....@na... > To: amf...@li... > 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/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |