I just verified the method here and it works just fine, with 128 values.
Here's the code I used:And here's the result:Code:i VAR BYTE j VAR BYTE Array VAR BYTE[128] PAUSE 3000 Main: GOSUB ClearArray HSEROUT["Enter new values...", 13] For i = 0 to 127 HSERIN[WAIT ("a"), HEX2 Array[i]] NEXT ' Send values back, the Array[i-1] and i//16 stuff is just there ' to format the output a little better, for readabillity. For i = 1 to 128 HSEROUT[HEX2 Array[i-1]] IF i // 16 = 0 THEN HSEROUT[13] ELSE HSEROUT[","] ENDIF NEXT HSEROUT[13, "DONE", 13] Goto Main ClearArray: For i = 0 to 127 Array[i] = 0 NEXT RETURN
Now, this was on a 18F25K20 running at 64MHz, which is 16 times faster than 4MHz. On the other hand I used 115200 baud which is 12 times faster than 9600. If it refuses to work at your end then, as a test, decrease the baudrate or increase the oscillator speed.
/Henrik.




Bookmarks