Receiving weird triggers in EEG

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Win 10
PsychoPy version (e.g. 1.84.x): 2023.2.3
Standard Standalone? (y/n) :yes
What are you trying to achieve?: I am trying to send triggers, numbers from 1 to 10, but in the final edf data I see weird 5-digit long numbers instead (65332). Not every trigger is represented by one 5digit number, so there is fewer different 5digit numbers than my triggers I would like to send, (otherwise, it would be no problem).

What did you try to make it work?: I used a code component, something like

 if frameN == 97:
        p_port.setData(1)
    elif frameN == 121: 
        p_port.setData(0)
    else:
        pass

the triggers are sent and received, so the code is not the problem, but they are not represented correctly in EEG recorded signal. I am not sure whether there is a problem in sending the triggers (probably not), receiving them, or reading them. However, the numbers I receive are not random, when I send the trigger 0 the trigger I receive in EEG is 65536, which is 2^16. Since the parallel port I am using has only 4 data lines, I can code only 16 digits (0-16 plus zero), does it mean something that 65532 is 2^16? Other received trigger numbers are e.g. 65532, 65533, 65535. Can somebody see what is wrong, and how can I send and also receive numbers from 1 to16. I tried to send the numbers in 4bit format (however, it is probably stupid), with no change.