The author of this scheme is trying to make a controller model. Therefore, he marked the name of the chip's pins with tunnels. I also do this (for example, in the TL431 chip).
Oh... I understand.The author of this scheme is trying to make a controller model. Therefore, he marked the name of the chip's pins with tunnels. I also do this (for example, in the TL431 chip).
Yes of course.The main task is to localize the error that slows down the development of the model.
Solved at Rev 1023.1) there is no reaction to pressing the buttons
I don't undertand this one.3) the activated command cannot be stopped by pressing the Stop button.
After solving 1), when I press "Play" the motor spins for aproximately 1 second and stops by itself.
I don't know how to do for continuous play.
Currently, even after solving 1) it stops after 1 second with Break switch open or closed.If you turn off the Break switch, the movement of the motors stops after 1 second.
Thanks, that is good information.Perhaps the reason for the error is incorrect interrupt handling. The interrupt handler is in the program from line 133.
Solved at Rev 1029.The MCU monitor does not display the lower bits of the status register in versions 1.0.0 RC2, 0.4.15 R266, 0.4.15 R271
Solved at Rev 1041.the movement of the motors stops after 1 second, with Break switch open or closed.
Fizik_S likes this post
SPI module is basically identical.Is the SPI module of 1.0.0 the same like the one of 1.0.1 R1279?
Indeed I would say that the problem is in 1.0.1:The following link leads to a (rough coded) SPI example, where a WS2812 matrix shall be refereshed by a slave (random equalizer LEDs). The 1.0.1 R1279 does this fine, but the 1.0.0 seems to have some trouble with the SPI...
// Timing in ns
#define w_zeropulse 350
#define w_onepulse 900
#define w_totalperiod 1250
// The only critical timing parameter is the minimum pulse length of the "0"
// Warn or throw error if this timing can not be met with current F_CPU settings.
#define w_lowtime ((w1_nops+w_fixedlow)*1000000)/(F_CPU/1000)
#if w_lowtime>550
#error "Light_ws2812: Sorry, the clock speed is too low. Did you set F_CPU correctly?"
#elif w_lowtime>450
#warning "Light_ws2812: The timing is critical and may only work on WS2812B, not on WS2812(S)."
#warning "Please consider a higher clockspeed, if possible"
#endif
Not 100% sure about this...TimFisch wrote:The I2C to parallel component acts strange, when used as a sending slave: I combined it with an ADC and tried to get all date via I2C. For analog values larger than 2.5 (= digital values with D7 set) everything works fine. For smaller values the TWSTO seems not to be set.
I found where this issue come from.arcachofo wrote:About WS2812:
The library you linked seems to produce timings out of specifications, at least in the simulation:
T1H = 875 ns, while specification = 700 +-150 ns.
In the library T1H is defined at 900 ns, which it does well but is out of specifications:
That is exactly what I was thinking:Would be great to support at least WS2812, WS2812b and the SK6812 in longterm
This problem is not easy to solve.EDIT: I think one issue might also be, that the WS2812b seems more tolerant to a delay between the 24bit packets. So, when the 24th bit has a longer low voltage time (but below RES time) it seems still to work.
It is always good to know that the simulation does not work when it shouldn't.Sorry for the alarm..
TimFisch likes this post
arcachofo wrote:New build at Rev 1145 uploaded.
Have a look at first post for download links and list of changes.
SV_byte:
OUT EEARL, tmpHiL
OUT EEDR, tmpHiH
CLI ; disable interrupts during timed sequence
SBI EECR, EEMWE ; enable EEPROM write
SBI EECR, EEWE ; start EEPROM write
SEI ; re-enable interrupts
EE_wait:
SBIC EECR, EEWE ; wait to end previous saving
RJMP EE_wait
EEiniRt:
RET
There is a problem with EERE :The flag EEWE in EECR doesn't reset (1 to 0) to indicate end of EE writing (typically, writing a byte takes 8.5 ms).
SBI EECR, EEMWE ; enable EEPROM write
arcachofo wrote:There is a problem with EERE :The flag EEWE in EECR doesn't reset (1 to 0) to indicate end of EE writing (typically, writing a byte takes 8.5 ms).
Writing to EEMWE with EERE being 1 triggers a read here:
The read operation takes 4 extra cycles, so when EEWE is written it is too late...
- Code:
SBI EECR, EEMWE ; enable EEPROM write
Obviously this should not happen but not sure about the exact behavior:
EEWE is cleared by hardware when the write operation is finished.
But datasheet says nothing about clearing EERE, and code examples don't clear EERE by software.
This suggest that writing 1 to EERE triggers a read operation even if it is already 1.
The problem is that the current implementation triggers it even for SBI EECR, EEMWE...
SBI EECR, EERE
IN tmpHiH, EEDR
SBI EECR, EEMWE ; enable EEPROM write
SBI EECR, EEWE ; start EEPROM write
Similar topics
Permissions in this forum:
You cannot reply to topics in this forum