28X2/16MHz res./setfreq em64/sertxd - pushing the envelope too far?

MartinM57

Moderator
By my calcs, that results in an outgoing baud rate of 76800 - no good for the (F8) terminal but Bray's terminal allows custom baud rates.

Code:
Code:
#picaxe 28x2
#no_table

setfreq em64

main:

  for b1 = 0 to 255
	sertxd("The value of b1 is ",#b1,13,10)
	pause 4000
  next b1

goto main
Output (scroll down lines 87, 92 onwards):
Code:
The value of b1 is 0
The value of b1 is 1
The value of b1 is 2
The value of b1 is 3
The value of b1 is 4
The value of b1 is 5
The value of b1 is 6
The value of b1 is 7
The value of b1 is 8
The value of b1 is 9
The value of b1 is 10
The value of b1 is 11
The value of b1 is 12
The value of b1 is 13
The value of b1 is 14
The value of b1 is 15
The value of b1 is 16
The value of b1 is 17
The value of b1 is 18
The value of b1 is 19
The value of b1 is 20
The value of b1 is 21
The value of b1 is 22
The value of b1 is 23
The value of b1 is 24
The value of b1 is 25
The value of b1 is 26
The value of b1 is 27
The value of b1 is 28
The value of b1 is 29
The value of b1 is 30
The value of b1 is 31
The value of b1 is 32
The value of b1 is 33
The value of b1 is 34
The value of b1 is 35
The value of b1 is 36
The value of b1 is 37
The value of b1 is 38
The value of b1 is 39
The value of b1 is 40
The value of b1 is 41
The value of b1 is 42
The value of b1 is 43
The value of b1 is 44
The value of b1 és 45
The value of b1 is 46
The value of b1 is 47
The value of b1 is 48
The value of b1 is 49
The value of b1 is 50
The value of b1 is 51
The value of b1 is 52
The value of b1 is 53
The value of b1 is 54
The value of b1 is 55
The value of b1 is 56
The value of b1 is 57
The value of b1 is 58
The value of b1 is 59
The value of b1 is 60
The value of b1 is 61
The value of b1 is 62
The value of b1 is 63
The value of b1 és 64
The value of b1 is 65
The value of b1 is 66
The value of b1 is 67
The value of b1 is 68
The value of b1 is 69
The value of b1 is 70
The value of b1 is 71
The vaìue of b1 is 72
The value of b1 is 73
Ôhe value of b1 is 74
The value of b1 is 75
The value of b1 is 76
Ôhe value of b1 is 77
The value of b1 is 78
The value of b1 is 79
The value of b1 is 80
The öalõe of b1 is 81
The valõe of b1 ió 82
Thå value of b1 is 83
The value of b1 is 84
The value of b1 és 85
The value of b1 is 86
The vaìue oæ b1 és 87
The value of b1 is 88
The value of b1 is 89
The value of b1 is 90
The value of b1 és 91
The valõe of b1 is 92
The value of b1 is 93
Ôhe value of b1 is 94
The valuå of b1 is 95
The value of b1 is 96
The value oæ b1 is 97
The valõe of b1 és 98
Tèe válue ïf b1 ió 99
The value ïf b1 is 100
Tèe value ïf b1 is 101
The valõe of b1 és 102
The value ïf b1 is 103
The value oæ â1 is 104
Ôhe value of â1 is 105
Thå öaluå of b1 is 106
The valõe of b1 is 107
Thå öalue of b1 ió 108
The value ïf b1 is 109
The válõe oæ b1 ió 110
Thå öaìuå of b1 is 111
The value ïf b1 is 112
Ôhe value of b1 ió 113
The value oæ b1 is 114
The válue ïf b1 és 115
The value of b1 is 116
The value of b1 ió 117
The value of b1 is 118
Ôhe value of b1 is 119
The öalue of b1 is 120
The value of b1 is 121
The válue of b1 is 122
The vaìuå ïf b1 is 123
The valuå of b1 is 124
The value of b1 is 125
The value of b1 is 126
Tèe válue oæ b1 is 127
The value oæ b1 is 128
The valõe oæ â1 is 129
Tèe valõe of b1 is 130
Ôhe value ïf b1 is 131
The value of b1 is 132
The vaìue of b1 is 133
Ôhe öalue of b1 is 134
The value of b1 ió 135
The value of â1 is 136
The válue of b1 is 137
The value ïf b1 is 138
Tèe válõe oæ â1 is 139
The value of b1 is 140
The válue of b1 és 141
The value of b1 és 142
The value of b1 is 143
The valuå ïf b1 ió 144
Ôhe öalue oæ b1 is 145
Ôhe öalue of b1 is 146
The valõe of b1 ió 147
The value of b1 is 148
The value ïf b1 ió 149
The valõå of b1 is 150
Thå váluå of b1 is 151
The vaìuå of b1 is 152
The válue of b1 ió 153
The öalue of b1 is 154
The öalue of b1 és 155
Ôhe valõe of b1 is 156
The value of b1 ió 157
The öaìue oæ b1 és 158
The öalõe of b1 ió 159
The value of â1 is 160
Ôhe öalue of b1 és 161
Thå valuå ïf â1 is 162
Ôhå válõe of b1 és 163
The öalue of b1 is 164
Ôhå value of b1 is 165
The vaìue of â1 is 166
The valõe of b1 is 167
Tèe öalue of b1 is 168
The öalue of â1 is 169
Ôhå value of b1 is 170
Ôhe value ïf â1 is 171
The vaìue of b1 ió 172
Ôhå value of b1 is 173
Tèe öalue of b1 is 174
Ôhe value of b1 ió 175
Thå válue of b1 ió 176
The vaìue of â1 is 177
The öalue of b1 is 178
The value of b1 ió 179
The öalõe ïf b1 is 180
The value oæ b1 ió 181
The value of b1 ió 182
The vaìue of b1 is 183
Ôhe value of b1 is 184
Tèe váluå of â1 is 185
The vaìue of b1 is 186
Thå válue ïf â1 is 187
The value oæ b1 ió 188
The vaìue of b1 ió 189
Ôhe value oæ b1 is 190
Ôhe vaìue of b1 is 191
Tèe vaìue of b1 is 192
Ôhe vaìue of b1 ió 193
The váluå oæ b1 is 194
Tèe öálõå of b1 ió 195
The öálue of b1 is 196
The öalõe ïf â1 és 197
Thå value of b1 is 198
The válõå oæ b1 ió 199
Thå value of b1 is 200
The vaìue oæ b1 ió 201
Thå value of b1 is 202
Tèe öalõe of â1 és 203
The vaìue of b1 is 204
The váluå of b1 is 205
Thå válue of b1 is 206
Thå vaìue of â1 és 207
Ôhe vaìue of â1 ió 208
Ôhe value of â1 is 209
The valõe ïf b1 is 210
Tèe válue of â1 és 211
Tèe öalõe of â1 is 212
Ôhe value ïæ b1 ió 213
Tèe válue of b1 is 214
Ôhe value ïf b1 is 215
Tèe öálue oæ b1 is 216
Thå vaìue of â1 is 217
Ôhe vaìue of b1 ió 218
The value of b1 is 219
Thå vaìue ïæ b1 ió 220
Thå vaìue ïf b1 is 221
Tèe öaluå of b1 is 222
Ôhe öaluå oæ b1 is 223
Tèe vaìue of â1 és 224
The valõe ïæ b1 is 225
Thå vaìue ïæ b1 is 226
Tèe öáluå of â1 és 227
Tèe vaìue ïæ b1 és 228
Ôhe öalõå of b1 is 229
Thå valõe ïæ b1 is 230
The vaìue of â1 és 231
Thå vaìue of b1 ió 232
The válue of b1 is 233
Ôhe öálue of b1 és 234
Thå valõe ïæ b1 is 235
Ôhe value ïf b1 ió 236
Ôhe vaìue of â1 és 237
Ôhe vaìue of â1 és 238
The válue of b1 és 239
The valõå oæ b1 is 240
Ôhe vaìue ïf b1 is 241
Ôhe öáìue ïæ b1 is 242
Ôhe valuå of â1 is 243
Thå valõå of b1 ió 244
Tèe öálue of b1 ió 245
The value of â1 ió 246
Ôhe öálue of â1 is 247
Tèå valõe of â1 is 248
Thå vaìue of â1 ió 249
Ôhe valõå of b1 is 250
Tèe válue of b1 is 251
Thå valõå of â1 ió 252
Thå valõå of â1 is 253
Thå valõå of b1 és 254
Ôèe vaìue ïæ b1 is 255
Bray's Terminal is showing that there are framing errors

My ultimate target is 115200 through hserout - not built that part yet, but will it work if simple sertxd doesn't seem to?

:(
 

hippy

Ex-Staff (retired)
28X2 / 16MHz / SetFreq EM64

Is outside of the PICmicro operational envelope, 40MHz max, so some issues are to be expected.

Testing HSEROUT with 115200 baud at EM32 ( 8MHz resonator ) didn't show any corruption, overruns, framing errors or data loss for me -

#Picaxe 28X2
SetFreq EM32
HSerSetup B115200_32, %010 ' N115200
Do
HserOut 0,( "UUUUUUUUUU The value of w0 is ", #w0, CR, LF )
w0 = w0 + 1
Loop

On "not built that part yet", using %010 with HSERSETUP effectively creates an N115200 baud rate so Leg 17 (TX) can be connected directly to a download cable without any inversion or MAX232 required.

That was using a physical COM port. Used with AXE027 the results were not so successful. The data arrives in 'chunks' and there was some data loss. That I suspect is down to the Terminal emulator and OS I'm using on a relatively pedestrian PC ( by today's standards ) which was dropping data itself.

HSEROUT at 115200 baud works as expected, whether it can be received at full-tilt, with back-to-back transmission, is down to other factors.
 
Last edited:

MartinM57

Moderator
28X2 / 16MHz / SetFreq EM64
Is outside of the PICmicro operational envelope, 40MHz max, so some issues are to be expected.
Interesting - never seen that noted anywhere - why does the compiler give an "em64" option if that is so?

That was using a physical COM port. Used with AXE027 the results were not so successful.
AXE027 here as well.

My target is a specialised hardware device with 115200 baud 5v comms that works fine when driven from a PC with level translators in place (and probably inverters in place but it's not documented whether its N or T at the 5v interface, so some experiments needed)

I'll soldier on...ta

EDIT - the "specialised hardware device" will be onboard the PICAXE PCB.
 
Last edited:

SilentScreamer

Senior Member
That's the second time I've mis-read that page of the manual :embarassed:
I made the mistake when I first got them (even after reading that 64Mhz is only supported on 3V X2s) :D.

(To hippy/Technical) Is it possible to add a warning to the programming editor to warn you when trying to run commands that are only officially supported on 3V parts on the 5V parts?
 
Top