|
|
| Author |
Message |
FFMan
Joined: 09 Jan 2010
Posts: 223
|
|
Posted: 13 February 2010, 23:00 PM Post subject: Port aliasing on the 328 |
|
|
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: |
|
|
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 |
|
|
| 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 |
|
 |
|