Using P31 after initialization
Hi guys,
It turns up that all of my Prop pins are booked...except for the last four pins. I need more pins (at least one), but initialization signals really mess things up when my circuit is powered on. I am trying to use P31, but I don't think it's working the way I had thought it would work.
P31 is an input during initialization; it receives from the PC. The line I want connected to it is an output which is initially LOW.
Wouldn't the Prop take that to mean that there no PC connected, and to just continue loading from EEPROM?
It turns up that all of my Prop pins are booked...except for the last four pins. I need more pins (at least one), but initialization signals really mess things up when my circuit is powered on. I am trying to use P31, but I don't think it's working the way I had thought it would work.
P31 is an input during initialization; it receives from the PC. The line I want connected to it is an output which is initially LOW.
Wouldn't the Prop take that to mean that there no PC connected, and to just continue loading from EEPROM?
Comments
mov address, ina 'Obtain the address and data mov data, ina mov temp, ina shr temp, #17 and temp, addressFilter2 shr address, #8 'Adjust address to proper position and address, addressFilter 'Filter out unwanted pin states or address, temp and data, dataFilter 'Filter out unwanted pin states storeData add baseAddress, address 'Obtain the indexed address wrbyte data, baseAddress 'Write data to the indexed address xor outa, wait_pin waitpeq cs_pin, cs_pin 'Wait until chip select signal goes inactive jmp #monitor
This is an excerpt from a program. Connected to the Prop [P8-P21] are address lines [A0-A13]. I need one more line [A14] to get fed to the Prop (hopefully through P31...). Because A14 won't come after A13 on the Prop, I guess I have some bit shifting to do. With A14 connected to P31, this is the code I have. Should 'address' hold the correct address after the shifting and masking?mov address, ina mov data, ina [COLOR="silver"]'{opt, wrbyte} and data, dataFilter ' Filter out unwanted pin states[/COLOR] shl address, #10 wc ' align with MSb, carry := address[31] rcr address, #1 ' collect A14 shr address, #17 ' Filter out unwanted pin states
This gets rid of all three filter masks (dataFilter is not required due to wrbyte usage) and some code.