Yes, they can subpoena you again for the trial, and if you refuse to testify again they can sentence you again for contempt of court. A new refusal is a new incidence of contempt; that's the reasoning. The rest of the reasoning is that the only reason you're allowed not to testify is if you exercise a valid privilege, whether it's Fifth Amendment, attorney-client, spouse, penitent-connfessor, etc. Anyone else is REQUIRED to testify when called as a witness.
I agree with the previous answer. Depending on the Jurisdiction people have sat in jail for many months or longer for refusing to testify and been held in contempt--i.ie journalists for refusing to reveal sources, and Barry Bonds' associates for refusing to testify. The key is to assert a privilege. We ALL have the 5th amendment right against self-incrimination, so cite it, LOUDLY and REPEATEDLY, (but politely and without profanity). At the least this should cause the judge to schedule a separate hearing on your claim, and he/she may not want to delay the trial to do so. Also the prosecutor could grant you immunity, which would remove your jeapordy and force you to testify, but you want that immunity grant as worded as BROADLY AS POSSIBLE. You really should get a lawyer, ask for a public defender. If told you are not on charges, indicate that you have been threatened with jail-- certainly grounds for an attorney. An experienced attorney can help you in other ways as well. For instance, if offered a limited grant of immunity for your testimony, your attorney could argue it is not broad enough to fairly prevent you from incriminating yourself; or he/she may argue that a State immunity grant is not sufficient if there are equivalent Federal charges possible. In other words there are a lot of technicalities that they could make a real stink over, and cause the DA to not want to bother. But beware, fail, and you could easily sit in jail until the trial is over and any time to appeal has expired.
I practice in Santa Clara County.
No one can make you say anything.
Stand your ground.
You can be held in custody for civil contempt during the pendency of the proceeding.
Also, if you were not served with a subpoena to appear, you did not sign an agreement to appear on the master trial calendar and a judge did not order you back to court, you do not have to go. A letter is not a subpoena.