Prev: Let's design a fake Perpetual Motion machine
Next: Currently Googling for Breakdown V of PTFE and Kapton
From: anthony fremont on 12 Mar 2010 22:03 On Mar 12, 10:50 am, Jan Panteltje <pNaonStpealm...(a)yahoo.com> wrote: You should be using a shadow register.
From: Spehro Pefhany on 12 Mar 2010 23:14 On Thu, 11 Mar 2010 22:40:54 GMT, the renowned Jan Panteltje <pNaonStpealmtje(a)yahoo.com> wrote: >I was writing a driver for a graphics LCD for PIC 18F14K22. >That went OK: > ftp://panteltje.com/pub/graphics_lcd_driver_img_1_1861.jpg > >But I wrote it is asm, so it needed a lot of typing, >even more so because this display CD-19-HG1286418C has a strange >driver chip S6B0108 that comes from a planet where x is vertical and y horizontal, >and people write from to top to bottom probably on the right side towards the left... >and the display uses 2 driver chips for each half... so it took a lot of key hitting: > ftp://panteltje.com/pub/key_soup_img_1853.jpg >to get it to do things the European way, that I then reversed with x0, y0 at bottom left as >that is easier for what I want to do. > >But now about the problem. >I did all this with the 8 MHz PIC internal clock, and it works perfectly. >Activated the internal 4 x PLL, so to 64 MHz internal clock, results in 16MHz processor clock. > >Display stopped working, only display on and display off command still worked,. >Well, added the usual delay between I/O operations, but this time, >even with seconds delay, no effect. >Finally grabbed the scope, and looked at the PIC pins. >Now this is strange: > > bsf PORTA,1 ; pin 18 LCD_C_D > bcf PORTA,5 ; pin 2 LCD_WR Umm... why in the world would you do a Read-Modify-Write instruction on a PIC PORT when you are trying to toggle at high speed? Change PORTA to LATA and see what happens. Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff(a)interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
From: Martin Riddle on 12 Mar 2010 23:50 "Jan Panteltje" <pNaonStpealmtje(a)yahoo.com> wrote in message news:hnbri1$pu0$1(a)news.albasani.net... > I was writing a driver for a graphics LCD for PIC 18F14K22. > That went OK: > ftp://panteltje.com/pub/graphics_lcd_driver_img_1_1861.jpg > > But I wrote it is asm, so it needed a lot of typing, > even more so because this display CD-19-HG1286418C has a strange > driver chip S6B0108 that comes from a planet where x is vertical and y > horizontal, > and people write from to top to bottom probably on the right side > towards the left... > and the display uses 2 driver chips for each half... so it took a lot > of key hitting: > ftp://panteltje.com/pub/key_soup_img_1853.jpg > to get it to do things the European way, that I then reversed with x0, > y0 at bottom left as > that is easier for what I want to do. > > But now about the problem. > I did all this with the 8 MHz PIC internal clock, and it works > perfectly. > Activated the internal 4 x PLL, so to 64 MHz internal clock, results > in 16MHz processor clock. > > Display stopped working, only display on and display off command still > worked,. > Well, added the usual delay between I/O operations, but this time, > even with seconds delay, no effect. > Finally grabbed the scope, and looked at the PIC pins. > Now this is strange: > > bsf PORTA,1 ; pin 18 LCD_C_D > bcf PORTA,5 ; pin 2 LCD_WR > > should set pin 18, and then clear pin 2 > > This is what happens at 16 MHz clock. > But at 64 MHz clock after the first instruction pin 18 does not go > high, > > > > |||||||||||||||||||||||||||||||||||||| > porta, 1 > _________||||||||||||||||||||||||||||||||||||||_____________________ > pin 18 > 16 MHz RF > > ----------------------------------------------- > | > porta, 5 > > |_________________________ pin 2 > > ^ ^ > | | > bsf PORTA,1 bcf PORTA,5 > > > > but start outputting 16 MHz until the second instruction, and then > goes to _zero_, > the second instruction operates normally and clears pin 2. > > > It seems the PIC internal output FF for pin 18 does not toggle, but > just follows the internal clock. > > I suspected a load problem and added an emitter follower because it > drives a 20 cm long flat cable to the LCD. > pin 18 is also the PGC (program clock) for in circuit programming, but > the effect persists with > pin 18 loaded with with only about 1k to ground. > > I think the PIC is out of spec here, but not sure if I am allowed to > use it with 64 MHz on internal oscillator. > Went back to 16 MHz clock, will work with that for now, > will have to get some more PICs too to see if it is only this one.... > FYI. > > > > What voltage are you running at? VCO range is 20mhz at 1.8 to 3.0v, and 64mhz for 3.0 to 5.0v Cheers
From: Jan Panteltje on 13 Mar 2010 08:15 On a sunny day (Fri, 12 Mar 2010 23:50:01 -0500) it happened "Martin Riddle" <martin_rid(a)verizon.net> wrote in <hnf5i0$qac$1(a)news.eternal-september.org>: What voltage are you running at? >VCO range is 20mhz at 1.8 to 3.0v, and 64mhz for 3.0 to 5.0v 5.18V
From: Paul E. Schoen on 13 Mar 2010 20:19 "Paul E. Schoen" <paul(a)pstech-inc.com> wrote in message news:CGWmn.72788$1n5.50230(a)newsfe04.iad... > > > It seems reasonable that a BSF instruction might have a problem for an IO > pin, compared to a standard memory register, because it must (in one > cycle) read, modify, and write the modified byte to the port. This will > certainly take longer than an internal file register. I am surprised that > the code does not automatically use the LAT register, but there may be > compatibility issues. The 12F and 16F chips do not have the LAT registers, > but they also probably do not have a 64MHz option. Interesting trivia: From the datasheet in PORTA: "Reading the PORTA register reads the status of the pins, whereas writing to it, will write to the PORT latch." It does not say this about the B or C ports. But you are using Port A, as I recall... Hmmmmm Paul
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Let's design a fake Perpetual Motion machine Next: Currently Googling for Breakdown V of PTFE and Kapton |