AVR playing video and audio ?

Go To Last Post
23 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guys,

Does anyone of you know on how to play video+sound with avr ?
A simple one alike in mobile phone...

The display I used for the first time, 128x64 KS0108, I'll move to color if it's working...

Perhaps I need a AV processor chip for it, any suggestions ?

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A VS1003 will handle your audio

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

how about the chip for video ? thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bianchi77 wrote:
Perhaps I need a AV processor chip for it, any suggestions ?
4D Systems has a 16-bit MCU that can do audio and video.
AV files would be on a microSD attached to their MCU.

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:
bianchi77 wrote:
Perhaps I need a AV processor chip for it, any suggestions ?
4D Systems has a 16-bit MCU that can do audio and video.
AV files would be on a microSD attached to their MCU.

Is it expensive ? what's the chip name ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:
A VS1003 will handle your audio

Is there any similar chip like VS1003 but it's decoding avi,mpg or any video files ?

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cell phones use dual core 3GHz ARMs. 1000s of times faster than a 20MHz AVR. You could do RGB video but it would be a frame every 2 secs or so.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
Cell phones use dual core 3GHz ARMs. 1000s of times faster than a 20MHz AVR. You could do RGB video but it would be a frame every 2 secs or so.

I know that, can it be only black and white for KS0108,
I'm not asking something fancy, but simple and easy, the point is, to understand how it works in the code...

what's the simplest file for video ? avi or mpeg?
which chip can be used for decoding it ? any SPI interfaces chip ?

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Black and white" means continuously variable from black to white. Maybe 256 levels 8 bit. A KS0108 has off and on. Not the same.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

FYI - That is referred to as "grey scale" or "greyscale". KS0108 has "2 level greyscale". You would probably want minimum of 256-level since that uses a whole 8-bit byte. You will still see sharp contours in gradients.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

so what chip (slave processor) can I use with atmega128 for displaying video on LCD ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bianchi77 wrote:
Is it expensive ? what's the chip name ?
PICASO (4D Systems)
Would be easier to use one of their boards (MCU, LCD, glue ICs, LDO, etc.) and their programming cable.

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

which board do you use ?
I saw
uLCD-24PTU,uLCD-28PTU,uLCD-32PTU

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't.
If I were to use one I'd buy from what's in-stock at a local distributor here.
fyi, 4D Systems has an Arduino library for their Arduino display shields.

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

what's the simplest file for video ? avi or mpeg?

That question makes no sense. In the same way that WAV is a "container format" that can hold one of about 50 different audio formats that in an almost identical way AVI is a container format for video that can hold about one of 50 (more!) video formats. It can contain MPEG or MJPEG or H.264 or AVC (which basically is H.264) or individual uncompressed frames or ....

(actually AVI=Audio Video Interleave - it might contain both MPEG video and MP3 audio for the same sequence with synchronising time stamps).

So you can't ask "which is better: avi or MPEG" because one might actually contain the other. You might have asked "which is better MPEG1, MPEG2, MPEG-TS, H.264, AVC, raw frames...?"

As an AVR will have no time whatsoever left to do any form of video decompression (it'll struggle just to keep on drawing raw uncompressed frames at 5..10 frames per second) you don't really get a choice. You have to use raw 128x64 (or whatever it is) blocks of data and just have the AVR spend all it's time blitting them to the screen.

Even if you added a chip that could do some kind of decode (like MPEG) you'd still probably spend most of the time feeding it the raw encoded data and retrieving the decompressed frames to blit to the display (there's no DMA here to do that for you as on more capable CPUs).

So, yes, AVR doing audio+video is an interesting intellectual exercise but it's never going to be a practical solution. If you want that spend $25 on a Raspberry Pi!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Now I betcha you can do some pretty cool graphics animations on the ks0108... I wouldnt call that video, I'd call it real time graphics. Like a 3d cube rotating in pitch and roll, or a pong game with pots ( I guess I remember that from 76 or whenever). Or you could make a terminal with a usb or ps2 keyboard and the ks0108 and an rs232. Do email with it.

Imagecraft compiler user

Last Edited: Fri. Mar 7, 2014 - 05:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I'd call it real time graphics.

Do bear in mind that most KS0108 are connected to a Super-Twist Nematic LCD screen with a liquid crystal that has something like a 200ms switching time. So don't try to drive more than about 5 frames per second or it will blur. Whether you call this "realtime" or not is a good question.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've seen specs that call 300ms with man-in-the-loop acceptable. When you hit enter you expect to see some result within how many ms? As long as the 'next page' starts to draw within a second or so, most folks don't hit the crt with their fist. That's because they don't have a crt anymore, but you get the idea.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Quote:

what's the simplest file for video ? avi or mpeg?

That question makes no sense. In the same way that WAV is a "container format" that can hold one of about 50 different audio formats that in an almost identical way AVI is a container format for video that can hold about one of 50 (more!) video formats. It can contain MPEG or MJPEG or H.264 or AVC (which basically is H.264) or individual uncompressed frames or ....

(actually AVI=Audio Video Interleave - it might contain both MPEG video and MP3 audio for the same sequence with synchronising time stamps).

So you can't ask "which is better: avi or MPEG" because one might actually contain the other. You might have asked "which is better MPEG1, MPEG2, MPEG-TS, H.264, AVC, raw frames...?"

As an AVR will have no time whatsoever left to do any form of video decompression (it'll struggle just to keep on drawing raw uncompressed frames at 5..10 frames per second) you don't really get a choice. You have to use raw 128x64 (or whatever it is) blocks of data and just have the AVR spend all it's time blitting them to the screen.

Even if you added a chip that could do some kind of decode (like MPEG) you'd still probably spend most of the time feeding it the raw encoded data and retrieving the decompressed frames to blit to the display (there's no DMA here to do that for you as on more capable CPUs).

So, yes, AVR doing audio+video is an interesting intellectual exercise but it's never going to be a practical solution. If you want that spend $25 on a Raspberry Pi!

Clawson, thanks for the suggestion, how about some experiment with FPGA for audio+video ?
Something like this, if I'm not wrong...
http://opencores.org/project,nova

I have some FPGA boards and want to do something related with Audio video with them, something simple but make me understand on how it works....

If I buy raspberry pi, it's almost the same with PC, only a smaller scale...why don't I use a PC then, that defeats my purpose ....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bianchi - you seem to struggle with avr level applications, so going to a fpga is going to be a world of pain. Your lazy attitude will not be recieved well on fpga forums.

If using a raspi is the same as using a pc - then what are you trying to achieve? How is using an avr or fpga any different? You still have to leverage off other people's work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
If I buy raspberry pi, it's almost the same with PC, only a smaller scale...why don't I use a PC then, that defeats my purpose ....

What IS your purpose, then?
Quote:
I have some FPGA boards and want to do something related with Audio video with them, something simple but make me understand on how it works....

That sentence holds at least two contradictions:

1) FPGAs as such, and writing "firmware" for them, are not simple.
2) Audio is not simple.

If you really want to start with FPGA boards then start by implementing simple logic gates. An AND gate with two inputs, one output. This is the FPGA equivalent of "blinky" for AVRs. This will prove that you understood how to go from the very simplest source you can think of to a bitfile, and that the tool chain is in order and you have some knowledge about it.

You need to learn a language that superficially looks like any other programming language but actually is fundamentally different. You need to learn a hardware platform that is fundamentally different. You need to learn to handle the individual steps in a tool chain that is an order of magnitude more complex than e.g. the avr-gcc compiler. There is, AFAIK, not any case where you just start the FPGA development IDE, type in a few lines and press the "Burn to hardware" button. You need to have a decent understanding of the principally different hardware platform, both in structure and function.

It is true that an FPGA tool chain holds a lot of special tools but it is still significant that e.g. the installer for the Xilinx tools is over 4 GB.

I can say one thing though: If go down the FPGA route, then you will be cured from your aversion of reading thick data sheets. There is no way that I know of that you can handle FPGAs without reading a lot of reference documents and user guides.

And yes, if you think we are harsh - wait 'til you meet the gang at the FPGA forums. Any "please feed me" or "I cant bother reading documentation" will be amply met by getting slashed just above the feet.

All this from a fellow FPGA beginner. (When I find the time, that is. You can do a small AVR experiment in an hour or two. I never get the FPGA boards out unless I have a completely free week end.)

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
What IS your purpose, then?

+1

If a PC (or small SBC) is the right tool for the job then why not pick the right tool?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bianchi77 wrote:

I have some FPGA boards and want to do something related with Audio video with them, something simple but make me understand on how it works....

That's a great project.

There's a video file format which seems to correspond to your needs. FLI.

That's an old format used for animation in Animator Pro, 25 years ago, and thousand of teenagers have coded their own decoder in the 90's.

It is simple enough to be decoded by an atmega.

FLI can handle 320x200 pixels frames.
First frame is RLE encoded, and interframes are delta-encoded.
The decoding is usually faster than raw blitting. With cartoon-style animations you can obtain 25fps on a 16Mhz atmega.

http://www.fileformat.info/forma...