Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Port aliasing on the 328

 
Post new topic   Reply to topic    Forum Index -> ZBasic Native Mode
Author Message
FFMan



Joined: 09 Jan 2010
Posts: 223

Posted: 13 February 2010, 23:00 PM    Post subject: Port aliasing on the 328 Reply with quote

I'm porting some code from a zx24 to zx328n. Part of the LCD write routine cribbed from the 8bit example code uses a port alias technique recommended by Don to simply loading 8 pins with a data word.

LCD_DATA=C is how the code appears.

Now switching to the 328, there doesn't appear to be a complete port free to use in this way. Not insurmoutable as one could easily assign each bit of the data to any pin, but the alias is neat and quick.

Port B clashes with pin 14 which I need to do an inputcaputre on, and the XTAL pins
Port C seems to be missing C.7 and clashes with the download port
Port D clashes with the download comms pins

is there a neat solution to this, or do i just assign each pin individually ?

thanks
Back to top
kranenborg



Joined: 27 Jul 2009
Posts: 37
Location: Uppsala, Sweden

Posted: 13 February 2010, 23:26 PM    Post subject: Reply with quote

Hi,

it appears that you can get a fully available port D on the ZX-328 by disabling the COM1 port as discussed in the following link ( I needed a full port too): http://www.zbasic.net/forum/about1278.html

/Jurjen
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 14 February 2010, 0:14 AM    Post subject: Re: Port aliasing on the 328 Reply with quote

FFMan wrote:
Part of the LCD write routine cribbed from the 8bit example code [...]
My recommendation would be to use 4-bit mode. There is example code in AN-220 showing how to implement the 4-bit interface.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Native Mode Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group