impossible constraint in 'asm'

Status
Not open for further replies.
It turns out that none of the DIRECTION, RAISE, LOWER, or CHECK methods are working (or the methods to define the ports as variables) on the Teensy. For things to work properly, including reset and busy, I had to replace everything with pinMode, digitalWrite, digitalRead. I'll have a bit of time later to get back to this.
 
The attachment on msg #22 didn't work. Any chance you could repost it? Maybe even a photo? This could really help others who later find this thread and need to get these displays working!
 
Yeah, it was a photo and worked for a little while, then stopped.

IMG_20180524_091223.jpg
 
Another follow up on this, in case others are trying to get some of these screens to work.

My VFD has been working well with Paul's new delay function, but I have switched to a different display. The new display is mostly the same as the other one, but on a slightly different PCB that fits better in my project (I can more easily fit 2 screens above each other, as the PCB is a bit wider but a lot shorter vertically). The other big advantage is that the newer one also has sync serial. That library is more simple, doesn't have the delay or ASM code, and the display refresh is much faster than with async (mine wouldn't work at more than 19200 bauds, so the delay between each bit was high, no need for that with sync serial).

I also figured out why the Noritake DIRECTION, RAISE, and LOWER commands were not working, forcing me to set the pins in the library (sync or async).

Original code:
Code:
protected:
    unsigned OUT_PIN:4;
    unsigned BUSY_PIN:4;
    unsigned SCK_PIN:4;
    unsigned RESET_PIN:4;

The pin values were limited to 4 bits, which meant only pins up to #15 would work, and I was using 33 and up.

New code:
Code:
protected:
    unsigned OUT_PIN:8;
    unsigned BUSY_PIN:8;
    unsigned SCK_PIN:8;
    unsigned RESET_PIN:8;

Also, the DIRECTION and RAISE/LOWER commands in the init function need to be inverted (DIRECTION first). Code for the sync library:
Code:
void init() {
        _delay_ms(500);
    	DIRECTION(RESET,1);    	
        DIRECTION(OUT,1);
        DIRECTION(SCK,1);
        DIRECTION(BUSY,0);
        LOWER(OUT);
    	RAISE(SCK);
        RAISE(RESET);    	
    }

I also added that delay, as I noticed that the CU library had it, and without it in the init, serial output wasn't happening. In the GU7000_Serial_Sync library, the rest remains the same.

Now on to see if it will work with 2 identical displays (I previously had 1 GU dot matrix, and 1 CU 4x20, using different libraries).
 
Status
Not open for further replies.
Back
Top