PIC 18F46K22 support

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
dridri
Posts: 10
Joined: Sun Aug 21, 2011 2:23 am

PIC 18F46K22 support

Post by dridri »

I'm interested in programming with the 18F46K22, but it is not in the support list of EBlock USB Picmicro multiprogrammer (EB006).

Is there any way to get it working ?

Thanks.
France France France... :)

User avatar
Steve
Matrix Staff
Posts: 3431
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: PIC 18F46K22 support

Post by Steve »

I believe you can use PICkit to program this device on the EB006. Unfortunately the EB006 firmware cannot currently program the K22 family of chips. But we are still looking into it and hope to produce a fix for this.

dridri
Posts: 10
Joined: Sun Aug 21, 2011 2:23 am

Re: PIC 18F46K22 support

Post by dridri »

Ok, thank you.

Actually I want to drive a TFT LCD that I picked in a Sony PSP. It is really easy to drive (it just has CKL, HSYNC, VSYNC, DISP_ON, and 24 pins for color) and it has 480x272 resolution.
Heres the datasheet: http://www1.futureelectronics.com/doc/S ... T3DX02.pdf

Currently I use a PIC 18F4550, but I can't use any frame buffer (its RAM is only 2040 bytes), and it is really slow : CKL runs at about 6MHz instead of 9MHz just by drawing a blank screen.
I wanted to use a *K22 PIC because it can run at 64MHz, so it would be able to run the LCD at 7.5MHz, which is the mimimum required frequency.

But the real problem is the framebuffer, I get a DS1270AB from Maxim, but the PIC18 series don't have enough IO pins to drive SRAM + LCD. To get around this a friend (Spanish_dude) told me to use some shift registers, but using this divides speed by two (CKL + data takes 2 CPU cycles, instead of parallel IO that uses 'X' cycles for 'X' IOs).

So, what can I do ?


Thanks again, and sorry for my baad english :mrgreen:
France France France... :)

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: PIC 18F46K22 support

Post by medelec35 »

Hi dridri,
Don’t know if this is useful?
I went to
http://www.microchip.com/productselecto ... ector.html
18Fdevices run at 64 MHz.png
(68.74 KiB) Downloaded 8460 times
I have sorted the list in CPU speed order (looking at 64MHz). There are quite a few devices that PPP should support for example what about 18F87K90?
That runs at 64MHz and has 128KRAM
Martin
Martin

dridri
Posts: 10
Joined: Sun Aug 21, 2011 2:23 am

Re: PIC 18F46K22 support

Post by dridri »

Sorry but I don't think it has 128KB RAM, but 128KB Flash program memory, right?

But it is a 80 pins chip, so I can drive the LCD and the SRAM with the same chip (LCD takes 20 IO, and SRAM takes 29IO), the only problem is that it has a TQFP package, and I never tried to solder this kind of components.

Anyway, thank you :)
France France France... :)

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: PIC 18F46K22 support

Post by medelec35 »

dridri wrote:Sorry but I don't think it has 128KB RAM, but 128KB Flash program memory, right?
Yes sorry you are correct, I ment to say 128 ROM which is program memory. RAM is used for calulations and temp storage.


I will look for PDIP and if I find any suitable will post details.

Martin
Martin

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: PIC 18F46K22 support

Post by medelec35 »

The best I can do is 18F46K20 that is PDIP. However with PDIP I don’t believe you will have enough pins.
Not sure if you can get 80TQFP to PDIP converter (it might not even exist)?

Have you considered a separate chip for both, and doing serial comms between the two?
That’s about all I can suggest, as larger microcontrollers is not really my area.
So I probably won’t be any more help (if I have been any help in the first place :( )

Good luck

Martin
Martin

dridri
Posts: 10
Joined: Sun Aug 21, 2011 2:23 am

Re: PIC 18F46K22 support

Post by dridri »

Ok I see, I also found the 18F46K20.

I can do a TQFP to PDIP board, but I only have a soldering iron and some unsolder tape to solder the chip on my board.

I already thought of using separate chips, but the bus system is too slow.


Finally I'm thinking about using PIC32, because it will very powerful for that and I love MIPS programming :mrgreen:
But the programmers are too expansive.. (I'm just a student without any earnings). Moreover soldering a 64 / 80 / 100 pins TQFN package with just a soldering iron is the best way to kill my chips :|


Thanks again for your help and interest.
France France France... :)

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: PIC 18F46K22 support

Post by JonnyW »

Hello. Unfortunately all this talk of chips is over my head, but I am always interested in graphics projects.

Can I ask what sorts of things you had in mind to do for your graphical LCD?

Jonny

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: PIC 18F46K22 support

Post by medelec35 »

I would like to make a correction:
When I said " 80TQFP to PDIP converter "
I was getting TQFP mixed up with PLCC, as I was thinking that a chip with PLCC could be pluged in to carrier, and will be converted to PDIP.
Sorry for confusion.

Martin
Martin

dridri
Posts: 10
Joined: Sun Aug 21, 2011 2:23 am

Re: PIC 18F46K22 support

Post by dridri »

@JonnyW :
My final goal is to make an RC Car (or maybe a drone without mechanic parts, it depends on my lifter researches :roll: ), with an onboard camera. The controller then receives video, and has a touch interface.
But first, I'll just make a simple terminal, then 2D and 3D graphics with a port of my graphic library (which is already optimized for MIPS architecture if I use a PIC32).

Actually, I want to make this just for fun, I will see after if it's useful or not :mrgreen:
France France France... :)

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: PIC 18F46K22 support

Post by JonnyW »

I see. So a specialised graphics interface probably wouldn't be what you need, and direct pixel access, i.e. RAM, would be a must (for vector graphics and video). There are ways to cut down on the number of BPP stored in RAM (down to 2 BPP), but only for quite specific uses.

Jonny

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC 18F46K22 support

Post by Benj »

Hello,

If your still looking at the PSP display then I would suggest you find a different display, they are cheap for a reason.

I have looked into these displays and to get anything working you need a very high speed, high data throughput probably provided only by a FPGA device. I personally looked into using a PIC32 to drive the display but even at 80MIPs it just wasn't really going to cut it. In the end I went for a Freescale device as it had a onboard graphics engine and an interface for the display. However due to other projects and lack of time I have not really gotten any further with this project. Also the device's 400 pin ball grid array is a bit daunting and i'm not sure if I could get that fine a component soldered with any real precision.

dridri
Posts: 10
Joined: Sun Aug 21, 2011 2:23 am

Re: PIC 18F46K22 support

Post by dridri »

I think Im going to use two PICs: one designed only to render the framebuffer from its internal SRAM, and another one which works with a parallel RAM, and sends the new framebuffer through SPI.

Or maybe using the 2 PIC on the same RAM, but how?



Edit: @ Benj: hum okay I see, so it would be better to get another LCD display.
But are you sure that PIC32 is not fast enough? Because I can up to ~25FPS to display blank screen with a 8bit PIC (and ~7fps while accessing to framebuffer in internal SRAM)..
France France France... :)

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC 18F46K22 support

Post by Benj »

Hello Dridri,

If you want to have a go say using 2 pics or a pic32 then I would be interested at your progress. I think these devices could probably control the display running flat out but then modding the memory to do something like draw a line etc might require further processing.

I mainly decided against PIC devices because I wanted to create a games platform which could process 3d objects etc in real time and update the display with a decent refresh rate.

Also the pixel sizes are large so the amount of ram required to buffer the display would be outside the limitations of a PIC. I suppose you could half the resolution or something similar to cut down the size of this.

480 h x 272 v x 24 bpp = 391680 bytes of data per single image

The main problem with the display is that it does not have a internal buffer. You need to buffer the data locally and constantly send it out to the display. A FPGA that buffered the data and updated the display would be ideal and you could then use a PIC to interface to the FPGA. This would be my way of doing it anyway.

dridri
Posts: 10
Joined: Sun Aug 21, 2011 2:23 am

Re: PIC 18F46K22 support

Post by dridri »

I will use 240x136 resolution at 16bpp.

FPGA looks interesting, I never used this kind of IC. I maybe will use this if it's not too hard to program (is it programmable via a PIC ?)
France France France... :)

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC 18F46K22 support

Post by Benj »

I maybe will use this if it's not too hard to program (is it programmable via a PIC ?)
I think for an FPGA you need some kind of memory device which contains the program for the FPGA. This is then loaded into the FPGA on startup and the PIC then communicates with the FPGA using some kind of bus eg UART or SPI.

FPGA's are used in PCs for bios, graphics processing etc.

On a side note. You can also emulate microcontrollers inside some FPGA devices though these FPGA's are generally quite expensive.
http://www.embeddedtronics.com/pic_core.html

dridri
Posts: 10
Joined: Sun Aug 21, 2011 2:23 am

Re: PIC 18F46K22 support

Post by dridri »

I just found that Xilinx FPGAs can "auto-program" just by connecting them to a serial memory through SPI. So I think I can use a 1Mb SPI EEPROM. (does the MM EB006 can program EEPROM chips?)


Edit: Wow, FPGA are very expansive :shock:
I think that starting with two PIC32 would be not bad :mrgreen:
France France France... :)

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC 18F46K22 support

Post by Benj »

Yes I would try the PIC route first and see if you get anywhere.

FPGAs are good but yes they are very costly. Also EB006 cannot program EEPROM but you could use a PIC with say a SD card E-block to load data from a file into a EE chip.

dridri
Posts: 10
Joined: Sun Aug 21, 2011 2:23 am

Re: PIC 18F46K22 support

Post by dridri »

So, I will receive a PIC32 sample in few days, and then I going to buy a PickIt 3. Do you know what is the "basic" schematic to make a PIC32 running ?
France France France... :)

Post Reply