|
原帖由 tommywgt 於 2007-4-16 02:14 PM 發表 6 l* [; d- L) i5 y9 j
如果倍頻是成功的, 那phase shift就只是調整cycle中的1->0, 0->1的時間, 不是嗎? ' O, M5 X5 S" a9 h
" n! O3 M1 i9 u& C9 v, i
+ K. y+ F) P) M想法是這樣沒錯啦..6 H, ?- K! g3 O5 p0 w* v- m& z
以2.457MHz的clock來說...$ y0 `" X4 T# s
你會需要12bit的counter來數high是多少跟low是多少..(因為pwm的duty是會變的)9 j" i2 l. S* z
shift-->one counter
4 K. A7 b! v4 [' C( Fmemory high-->one counter
+ i4 x& {) h; R" i1 m, fmemory low-->one counter6 X" o, O) O! l
我目前是要用到四個counter...
+ J$ H2 a+ F" O+ G不過這樣做起來感覺很不好...
! M6 r% y0 D$ l6 R: Q
9 w" L& n, d! N$ A' M6 y而R G B各要一組shift..8 K. g3 f6 f3 e2 h, D* r+ y
128microcell已經被我寫爆了...唉....
0 n' h# }- t/ a
, x, \) c' o; W: _8 T3 a其實光是寫同步的的code...128microcell就已經被我寫爆了呀
@5 e+ [( k( t* z @* V2 b/ U(目前是用lattice的 iM4A5 128/64)
7 ~/ O% e$ Y5 t0 n( ^7 f' p. z- f. j( m: J4 V, J3 C7 G
所以才會問各位先進是否有其他的想法..... |
|