kronos web site sucks!!!!

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
psycho
Posts: 388
Joined: Thu Jan 10, 2008 8:13 pm
Location: Northwest Indiana
Contact:

Re: kronos web site sucks!!!!

Post by psycho »

Oh yeah. There are numerous tips that go unnoticed by people who have been doing this sort of thing for an length of time. I mentioned just a few.

Right now I am working on my PIC Video controller. It uses an FPGA to produce VGA (640x480). Although I have only gotten as far as implementing an 80 column text based version (like the old EGA version with the attribute byte). I am finding that the PIC is not fast enough in some cases. One of which is scrolling the text :

Code: Select all

void scrollscreen(void) {
	int i;
	unsigned char b;

	for(i = 0; i < 6400 - 160; i++) {
		b = readmem(i + 160);
		writemem(i, b);
	}

	// make sure to re-adjust caraty before leaving!!!
	if (caraty > 0) {
		caraty--;
	}
}
Unfortunately, the PIC I am using for this is an 18F87J11 which is 8 bit. The text video memory is 9600 bytes which means a 14 bit address bus. Which lengthens the time required for memory reads and writes to/from the FPGA. The scrolling is kinda slow (remember the days of the first PCs???)

What I want to end up with is a VHDL implementation of an LCD controller that is supported by the Microchip Graphics library. I think I will up the PIC to a 16 or 32bit PIC. Most likely a 32bit one.

For the whole project, I want a 32bit PIC @ 80MHz, a small FPGA (configured via the PIC), an SD card & USB host(on PIC), mouse/keyboard port on the FPGA side and 15 bits of VGA I/O (for starters)...

I might even get it to run ucLinux...

Just a bit of what you can do with a PIC :)

Kevin
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: kronos web site sucks!!!!

Post by MrAl »

Hi Kevin,

Sounds very interesting. I havent had to program any FPGA's in my time however, how much does
it cost for a basic programmer and what would you recommend there?

I built my own UVEPROM programmer years ago, but that technology went south with the
all the flash stuff out there now.
LEDs vs Bulbs, LEDs are winning.
psycho
Posts: 388
Joined: Thu Jan 10, 2008 8:13 pm
Location: Northwest Indiana
Contact:

Re: kronos web site sucks!!!!

Post by psycho »

You can get FPGAs that cost $1000s just for the chip. The board I got was almost $200 which, I admit, is alot. But, I wanted to put specific projects on there (The old 8 bit computers like the Coco, for instance). The coco design requires a 1 million gate FPGA and that is what is on my board. You can get the same board with 200K gates for $119.

However, there are MUCH less expensive boards. If you go to http://www.knjn.com/ShopBoards_RS232.html you will see their 100K Pluto board is only $30. But, it has no bells & whistles - just a plain board. I also don't know if it comes with the cable (mine came with a parallel port JTAG cable). This is the sister site (sales) of fpga4fun below.

Both Xilinx and Altera have free versions of the synthesis software for their low to mid sized/performance PLDs. But, if you get into the high end PLDs, expect to pay out the nose for both the chips and the software.

Have a look around on http:\\www.fpga4fun.com and http:\\www.fpgaarcade.com - both pretty good. From what I can tell, when you go to school for electronics, all of them teach PLDs.

There was a thread on here quite a while back about taking the VGA output of a computer and putting the image onto 4 monitors (each monitor will display a quarter of the total picture). Back then I suggested an FPGA for it but I wasn't quite sure that it would actually work. Now, having worked with them for a while, I am positive it would work --- and, it would be quite easy, too.

If you are interested in the board that I have, check out : http://www.digilentinc.com/Products/Det ... od=S3BOARD browse around their site because they have other, less expensive, boards, too.

Note that the Spartan 3 FPGA (and probably most others) is NOT 5v tolerant! If you put 5v on a pin, you will more than likely be looking to get another device! Hence the reason I am using the PIC18F87J11 - it's made for 3.3v. That is not to say that 5v PICs wont run at 3.3v... Most will. They will not run at full speed, however.

Oh, and if you just want to play around with it, go to http:\www.xilinx.com and grab their ISE Webpack (HUGE download - 2.5 gig). There is a very nice simulator in there.

Hope it helps,
Kevin
psycho
Posts: 388
Joined: Thu Jan 10, 2008 8:13 pm
Location: Northwest Indiana
Contact:

Re: kronos web site sucks!!!!

Post by psycho »

btw, another project that leaned me towards the board I got (albeit not the 1000K version) is a 32 channel 100MHz logic analyzer design http://www.sump.org/projects/analyzer/... I have used it to debug the project I am working on and it works great! Remember, you need a signal converter for 5v signals if you want to hook it up to anything that is 5v. You can get a board ($20) to convert the signals here : http://oakmicros.com/content/omla32-Log ... -Card.html... Although I have not needed it yet.

-- edit
This design alone would justify the cost of the $120 board. Where else can you get a 32 channel 100MHz LA for < $150 total??? Also, you can configure the project to do 16 channels at 200MHz.
--
Kevin
psycho
Posts: 388
Joined: Thu Jan 10, 2008 8:13 pm
Location: Northwest Indiana
Contact:

Re: kronos web site sucks!!!!

Post by psycho »

One more quick (longwinded) tip for those who are just starting out with PICs (or electronics, in general)...

PIC microcontrollers (and just about any other chip you care to name) have what is known as a datasheet available for them. If the part you are looking to get does not have a datasheet available for it, look at another part/mfg! A datasheet tells you, in detail, how the part is supposed to work. It should tell you all of the available operating modes and how to implement them. It should also list any other considerations about the hardware/control of the chip (timing diagrams, speeds, etc).

With that information in hand, always remember that sometimes, there are things known as errata. These are problems in the silicon (the chip) that make the device actually act differently than the datasheet says they should.

I will give you an example... The PIC18F87J11 (rev 1) is an 80 pin PIC who's datasheet says that the clock PLL will multiply the chosen oscillator by 4. So, in my case, the 10MHz xtal I am using will actually be multiplied by 4 inside the chip and will then be a 40MHz clock.

I was having a problem when implementing my project. When I enabled the PLL to get the higher speed clock, I was not getting the results I expected. None of the variables were correct... I had a look at the errata sheet for it and low and behold, there it was, in black and white....
4. Module: Oscillator Configurations (PLL)
When Phase Lock Loop (PLL) is enabled, if the
PLL input frequency is higher than 8 MHz, there
may be problems accessing the RAM.
Work around
Limit the PLL input frequency from 4 MHz to
8 MHz. This will cause the system clock to operate
from 16 MHz to 32 MHz.
If it is necessary to run the device above 32 MHz,
do not enable PLL and use the EC mode.
Date Codes that pertain to this issue:
All engineering and production devices.

Reading this, I found that I could either 1) use the 10MHz external osc as is (at 10 MHz) or 2) use the 8MHz internal osc with the 4x PLL to give me 32 MHz. I chose to go with option 2 because it was easier and speed is not critical (as far as timing with the FPGA). The thing I wanted to accomplish was max speed.

This is just one case to note. I am sure that others here have run into similar situations before. If the chip is not doing what it should and you "know" you have it right, read the errata!

You can find all the info on this particular case here:
http://www.microchip.com/wwwproducts/De ... e=en027149

Kevin
User avatar
kheston
Posts: 354
Joined: Wed Dec 03, 2003 1:01 am
Location: CA
Contact:

Re: kronos web site sucks!!!!

Post by kheston »

psycho,

Truly sage advice, thanks!

I've learned to expect such things in my programming travels and have already encountered similar undocumented "features" in the uCs I've played with. For the example you gave, at least you were able to find a corresponding note in the errata.

Sometimes when you find one of these gremlins in a java, C, or other language library, you're darn lucky if you can find so much as a forum post from someone with a similar problem to confirm your suspicion.
Kurt - SF Bay
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: kronos web site sucks!!!!

Post by MrAl »

Hi again,


Oh yeah, i remember now, i did work with an ASIC many years ago, probably right after they
first appeared on the market. Havent since then though.

Im not so sure i want to invest in this kind of stuff just yet. Maybe if something comes up
where i need the speed i might look into it a bit more. Lots of stuff on the web i see,
which describes the various processes about the FPGAs, but looks like a lot lot of reading ha ha.
LEDs vs Bulbs, LEDs are winning.
psycho
Posts: 388
Joined: Thu Jan 10, 2008 8:13 pm
Location: Northwest Indiana
Contact:

Re: kronos web site sucks!!!!

Post by psycho »

The biggest hurdle I have had is in programming. I have been programming on computers for more than 25 years. That is all fine and good. Each statement executes sequentially like it should. However, in a HDL, everything is concurrent. Yes, you can make a sequential process, but, that process is still concurrent with every other process in the design. If you forget this fact, you will make mistakes. This is a VHDL code snippet from the project I am working on now:

Code: Select all

	-- handle the tristating of the data bus based on pic_oe
	pic_data <= pic_dout when pic_oe = '1' else (others => 'Z');
	
	-- handle the data in from the pic
	char_ram_din <= pic_data;
	attr_ram_din <= pic_data;
	
	-- handle the pic_dout signals based on the LSB of the pic_address signal
	pic_dout <= char_ram_dout when pic_address(0) = '0' else attr_ram_dout;

	-- handle write enable lines
	char_ram_we(0) <= pic_we when (pic_address(0) = '0') and (pic_we = '1') else '0';
	attr_ram_we(0) <= pic_we when (pic_address(0) = '1') and (pic_we = '1') else '0';

	-- handle the address lines
	char_ram_addr <= pic_address(13 downto 1);
	attr_ram_addr <= pic_address(13 downto 1);
All of those operations happen at the same time. Whereas if you were to write a program for a computer (a non-threaded program), the statements don't do that. All in all, and, at least in my case, I am loving it. I would say, though, it is not for everyone!

Sorry that this thread got so far off the original topic...

Kevin
goner19
Posts: 84
Joined: Wed May 20, 2009 8:15 pm
Contact:

Re: kronos web site sucks!!!!

Post by goner19 »

ok the dam chip is here!
that was fast im gona pull it in right now

hold your breath!!!!
psycho
Posts: 388
Joined: Thu Jan 10, 2008 8:13 pm
Location: Northwest Indiana
Contact:

Re: kronos web site sucks!!!!

Post by psycho »

I took a look at the manual for the dios budget board... It looks to me like the 16pin chip that is next to the 9 pin programming connector is a MAX232 chip judging by the external charge pump caps. It also looks like you will be able to use the board for a normal PIC, too. I doubt you will be able to program a regular PIC with it, though...

Kevin
goner19
Posts: 84
Joined: Wed May 20, 2009 8:15 pm
Contact:

Re: kronos web site sucks!!!!

Post by goner19 »

ok new chip
same error

it must be the board

i guess ill have to buck up$$$ and buy the pickit2

kheston ,
the audrion is the older version of the dios?
goner19
Posts: 84
Joined: Wed May 20, 2009 8:15 pm
Contact:

Re: kronos web site sucks!!!!

Post by goner19 »

max232? is that any thing like an rs232?

the label on the 16pin chip is st232acn
psycho
Posts: 388
Joined: Thu Jan 10, 2008 8:13 pm
Location: Northwest Indiana
Contact:

Re: kronos web site sucks!!!!

Post by psycho »

ST stands for ST Microelectronics and yes, the 232 part is for RS232. The MAX part of the number I gave you would be from Maxim (another chip Mfg).

Take a look here
http://www.st.com/stonline/stappl/produ ... arch=ST232*

And it may be the connection with the board. Maybe the MAX232 (alot of people call rs232 chips MAX232's generically - even though they are made by another mfg...) went bad, maybe one of the caps went bad - 4 of those 5 caps next to the MAX232 are charge pump caps and they are very much required on that particular MAX232 type chip. There are some other RS232 level translator chips that don't require the caps, but most do.

Also, I would look carefully on the board for any traces that may have been cut or anything. A pin sticking out on the bottom of another board can ruin a trace if the boards are stacked on each other.

If you have a continuity tester (or you can use your scope) you can spend some time and trace the lines from the PIC to the MAX232 and out to the DB9 connector. Read the data sheet for the 232 chip (from the link above) and first check for incoming data on the DB9 (pinout: http://pinouts.ru/SerialPorts/Serial9_pinout.shtml)... Pin 2 & 3 are the data to/from the computer. If you have data there, and on the input pin of the MAX232, check the output of the same channel of the 232 for data going to the pic... You should be able to figure out why it doesn't work (as long as data is coming from the computer - which may be the problem to begin with)...

Kevin
User avatar
kheston
Posts: 354
Joined: Wed Dec 03, 2003 1:01 am
Location: CA
Contact:

Re: kronos web site sucks!!!!

Post by kheston »

The arduino is a completely different animal, no affiliation with Kronos. Check out: http://arduino.cc/
Kurt - SF Bay
goner19
Posts: 84
Joined: Wed May 20, 2009 8:15 pm
Contact:

Re: kronos web site sucks!!!!

Post by goner19 »

the adrino looks cool
and i have been reading the articles in n and v.
but i just wana be sure im not gona have the compaitbale issues i have now

and what do i need for a complier for it?
Post Reply

Who is online

Users browsing this forum: No registered users and 59 guests