Ken,
Sorry if I was confusing! Did I mention I was talking about the AtomBasic chip (not PRO), and the MBasic compiler?
s_out/s_in is equated to $02F & $02E in the ASM generated by the AtomBasic compiler.
When I attempted to compile the same program in MBasic, it didn't have a define for S_OUT, so I referred to the ASM file to determine it.
I believe the following are correct for MBasic (it's out of the manual)?
A0-A5 = 0-5
B0 -B7 = 8-15
C0-C7 = 16-23
D0-D7 = 24-31
and B0 being equ 8 fits that table.
S_OUT/S_IN are connected to RA4 according to the schematic of the BasicAtom (not pro) chip. Which is not one of the P0-P18 pins. I would have expected it (both) to be equ to 4.
I know "serout (or serin) A0, i9600, ["Hell o'world!"]" won't compile ;>)
OK, so I'll just map to a more appropriate pin. I probably want to go HSEROUT/HSERIN anyway (hardware).
MBasic doesn't assume (does it work) the AtomBasic modules, so I suppose the question is moot anyway.
I have (BasicMicro) 'bot code that I'd like to run on 18F452 and 18F4620 chips (I have several development boards), if MBasic gets there. Some stuff would be OK on an '877, which would be a start.
Kurt,
I'm not not talking about the Pro, but I did like the function you posted yesterday. I haven't wanted to delve into ASM for the Pro yet.
So many "similar" modules and compilers!
Thanks!
Alan KM6VV
------------------------------------------------------------
kenjj wrote:
Hi. I'm confused. There is no s_out/s_in for Pro5211. 0 to 7 is B0 to B7, 8 to 15 is C0 to C7. You can refer to any pin by its port number: A0, D7, B2, C6, whatever. If you write:
serout s_out, i9600, ["Hello?World?"]
the compiler will hurl. Well, actually, it will report an "unexpected token type". Pick a pin, like A0, for serial work and write:
serout (or serin) A0, i9600, ["Hell o'world!"]
and A0 is a serial pin. Careful with A4 (or is it A5?), the pin typically used on Atoms, as it is an open-collector port and needs a pullup.
What are you trying to do here?