can any pins be used to make use of the 2nd h/w uart on the zx24n or are there specific pins ?
I can't locate any documentation giving the answer.
thanks
Where is the 2nd h/w uart on a zx24n ?
Zbasic Native Mode Com2
Com2 pins are hardware assigned. See USART chart on page 17 of the ZBasic System Library Reference Manual.
P
P
great thanks
I see an interesting little foot-note that appplies to zx24n of:-
¹For these devices, the Com1 signals are logically inverted, the Com2 signals are not, however
so does that mean that if i convert code from zx24 using a software usart that i need to invert the signals or does does this mean the h/w usart behaviour is the same as the s/w usart ?
I see an interesting little foot-note that appplies to zx24n of:-
¹For these devices, the Com1 signals are logically inverted, the Com2 signals are not, however
so does that mean that if i convert code from zx24 using a software usart that i need to invert the signals or does does this mean the h/w usart behaviour is the same as the s/w usart ?
Zbasic Native Mode Com2
I'm not sure exactly what you are asking but you cannot change the invert state on comm2. See page 70, DefineCom(). If the receiving end is expecting an inverted signal, you'll have to add hardware inverters b/n h/w comm2 and the receiving end since you can't invert the signal in software.so does that mean that if i convert code from zx24 using a software usart that i need to invert the signals or does does this mean the h/w usart behavior is the same as the s/w usart ?
P
That is correct. You must always check the datasheet for the device you're connecting to find out if it uses inverted or non-inverted serial signals. If you are using a SW UART on the ZX , you then select the matching polarity in the DefineCom() call. If you are using a HW UART on the ZX, you must add external inversion if the polarity does not match that of the external device. The issue is the same in both cases; the only difference is in how you implement the matching polarity.FFMan wrote:so i can't set/change the invert on a h/w usart but i can on a s/ware one.
- Don Kinzer
If you are using a SW UART (Com3 to Com6) you never need an external inverter, assuming the device operates at TTL signal levels. Rather, if you need inverted logic just add &H80 to the flags for DefineCom(). Note, however, that if the external device uses standard RS-232 signal levels you'll have to use an external level converter (which includes a signal inversion).FFMan wrote:will i need external inverting h/w or not ?
An external inverter is needed in these cases:
- You're using Com1 on a 24-pin ZX device and the device with which you're communicating requires non-inverted signals.
- You're using Com1 on a ZX device other than one of the 24-pin series and the device with which you're communicating requires inverted signals.
- You're using Com2, Com7, Com8, etc. and the device with which you're communicating requires inverted signals.
If you're not sure whether the device outputs TTL signal levels or RS-232 signal levels, use a voltmeter to measure the voltage on the serial transmit line. If the voltage is 3 to 5 volts when idle, it is probably non-inverted TTL signal levels. On the other hand, if the idle voltage is -3 to -15 volts when idle, then it is using standard inverted RS-232 levels. In the latter case, you'll need an RS-232 level converter (which includes an inversion) to get non-inverted TTL signal levels.
- Don Kinzer
If communication with the external device works on a SW UART channel with the flags value of &H08, then it means that that device uses non-inverted, TTL-level I/O for its serial communication. That being the case, you should be able to use Com2 without external inversion. This conclusion is consistent with my earlier description of when you need inversion and/or level conversion.FFMan wrote:do you think i will be able to use a h/w channel without inverters ?
- Don Kinzer