Sounds like you may have an IAC (idle air control) issue. Heres a quick way to reset it and see if this is the problem. Disconnect both negative and positive battery cables from the battery. Rub the 2 cable ends together for 5-10 seconds. Reconnect the battery cables and turn on the key (don't start it) for 20-30 seconds. Turn the key off for 20-30 seconds and then start the truck. You may have to "feather the gas" for a little till the IAC picks up idle control. If the IAC controls the idle normally then you should be all set. If not I'd have to recommend taking it to a trusted shop for diagnosis and repair. Hope this helps!
P.S. By doing this test you basically reset the PCM, idle control and fuel control settings to factory specs.
Monday, December 11th, 2006 AT 2:16 PM