Controlling speed of dc motor

Nice catch! I've replaced the sn754410 and it works fine. But now I'm worried cause I'm not too sure how I burnt that out.

I've connected it like in the diagram.

Oh wait the board is usually connected to my computer and works fine. I connected the 9v battery to the jack and there was smoke coming from the digital pins.. I guess that burnt out my ic. I added the resistors and capacitors after that.. pray that works