What am I doing wrong
-
- Posts: 65
- Joined: 14 May 2010, 16:01 PM
What am I doing wrong
Dim x as Integer
Dim val as byte
dim CAS as byte
Sub Main()
GetCAS:
'putpin (portpin,mode)
'0 output 0
'1 output 1
'counter resets on high
call putpin(26,1) 'port D bit 1 high as in 0,1,2,3 etc etc RPM counter reset
call putpin(26,0) 'port D bit 1 low as in 0,1,2,3 etc etc RPM counter reset
Call putpin(25,1) 'port D bit 0 high as in 0,1,2,3 etc etc RPM counter enable
do
CAS = PortBit(27)
if CAS( <> 0) then 'I get an error here!!!!
exit do
end if
loop
For x = 1 to 10
val = Register.PINB 'get the port value
debug.print val;", "; 'send the data out in comma delimted form.
next
goto GetCAS
End Sub
'I'm dumb. I need more examples in the docs
'Paul Lamar
Dim val as byte
dim CAS as byte
Sub Main()
GetCAS:
'putpin (portpin,mode)
'0 output 0
'1 output 1
'counter resets on high
call putpin(26,1) 'port D bit 1 high as in 0,1,2,3 etc etc RPM counter reset
call putpin(26,0) 'port D bit 1 low as in 0,1,2,3 etc etc RPM counter reset
Call putpin(25,1) 'port D bit 0 high as in 0,1,2,3 etc etc RPM counter enable
do
CAS = PortBit(27)
if CAS( <> 0) then 'I get an error here!!!!
exit do
end if
loop
For x = 1 to 10
val = Register.PINB 'get the port value
debug.print val;", "; 'send the data out in comma delimted form.
next
goto GetCAS
End Sub
'I'm dumb. I need more examples in the docs
'Paul Lamar
- Attachments
-
- screen-capture-error1.JPG
- (136.12 KiB) Downloaded 117 times
-
- Posts: 65
- Joined: 14 May 2010, 16:01 PM
-
- Posts: 65
- Joined: 14 May 2010, 16:01 PM
I don't know what program it is executing but it is not this one
Paul Lamar
Paul Lamar
- Attachments
-
- screen-capture-error2.JPG
- (115.76 KiB) Downloaded 238 times
-
- Posts: 65
- Joined: 14 May 2010, 16:01 PM
I just converted it to a project and the same thing happens.
It acts like the old program is locked into the chip.
Is there a way to downloading the binary from the chip in the IDE?
I am hanging some stuff off Don's power supply and I wonder if some noise is getting into the system.
Here is a CAS stimulator. There is a bypass cap on all the WW modules.
Paul Lamar
It acts like the old program is locked into the chip.
Is there a way to downloading the binary from the chip in the IDE?
I am hanging some stuff off Don's power supply and I wonder if some noise is getting into the system.
Here is a CAS stimulator. There is a bypass cap on all the WW modules.
Paul Lamar
- Attachments
-
- 7500 RPM-CAS-Stimulater.jpg
- (29.56 KiB) Downloaded 127 times
It means that during the download process, the IDE received a character from the device that it wasn't expecting. In this case, the unexpected character has a hexadecimal code 0x43, i.e. a capital C. Since record 1 was evidently processed correctly, I guessing that something caused the download to abort on the device side - perhaps a spurious reset.Paul Lamar wrote:what does "Unexpected device response (0x43), record 2." mean?
- Don Kinzer
-
- Posts: 65
- Joined: 14 May 2010, 16:01 PM
-
- Posts: 65
- Joined: 14 May 2010, 16:01 PM
-
- Posts: 65
- Joined: 14 May 2010, 16:01 PM
In the 1281 serial interface schematic the USB interface is not shown.
What pin numbers are used for the USB interface?
I used pin 27 for an input and the USB interface appears to be damaged.
I suspect the USB is no longer working.
Is there anyway to mount the CPU in a socket or small plug in board?
Ideally that daughter board would have the essential USB interface on it and be isolated from the rest of the I/O.
Paul Lamar
What pin numbers are used for the USB interface?
I used pin 27 for an input and the USB interface appears to be damaged.
I suspect the USB is no longer working.
Is there anyway to mount the CPU in a socket or small plug in board?
Ideally that daughter board would have the essential USB interface on it and be isolated from the rest of the I/O.
Paul Lamar
- Attachments
-
- 1281-serial-interface-schematic.jpg
- (31.27 KiB) Downloaded 197 times
No. The reset toggling gets the device into "command mode" (part of the bootloader) from which downloads are initiated. At that time, the application is not running and, therefore, cannot affect the process.Paul Lamar wrote:Could there be a spurious lock the code so no new downloads are possible?
Only the transmit and receive lines for COM1 cannot be used for other purposes. On the ZX-1281, COM1 uses pins 27 and 28. See the table in the ZBasic System Library Manual.Paul Lamar wrote:Are there any pin numbers on the 1281 that should not be used for I/O?
Sockets for surface mount chips are typically very expensive (hundreds of dollars). You might be able to find a "breakout" board for the mega1281 but you would then need to add the serial interface circuitry and the ZX reset circuitry.Paul Lamar wrote:Is there anyway to mount the CPU in a socket or small plug in board?
- Don Kinzer